fix null safety

This commit is contained in:
2021-09-11 16:56:20 +06:30
parent a4d3777e8a
commit fe799ad820
32 changed files with 125 additions and 93 deletions

View File

@@ -7,9 +7,9 @@ import 'package:fcs/helpers/theme.dart';
class LocalText extends Text {
final BuildContext context;
LocalText(this.context, String translationKey,
{Color? color,
double? fontSize,
FontWeight? fontWeight,
{Color color = secondaryColor,
double fontSize = 13,
FontWeight fontWeight = FontWeight.w500,
List<String>? translationVariables,
String? text,
bool underline = false})
@@ -19,14 +19,14 @@ class LocalText extends Text {
translationVariables: translationVariables),
style: Provider.of<LanguageModel>(context, listen: false).isEng
? newLabelStyle(
color: color!,
fontSize: fontSize!,
fontWeight: fontWeight!,
color: color,
fontSize: fontSize,
fontWeight: fontWeight,
underline: underline)
: newLabelStyleMM(
color: color!,
fontSize: fontSize!,
fontWeight: fontWeight!,
color: color,
fontSize: fontSize,
fontWeight: fontWeight,
underline: underline));
}