null safety
This commit is contained in:
@@ -7,26 +7,26 @@ import 'package:fcs/helpers/theme.dart';
|
||||
class LocalText extends Text {
|
||||
final BuildContext context;
|
||||
LocalText(this.context, String translationKey,
|
||||
{Color color,
|
||||
double fontSize,
|
||||
FontWeight fontWeight,
|
||||
List<String> translationVariables,
|
||||
String text,
|
||||
{Color? color,
|
||||
double? fontSize,
|
||||
FontWeight? fontWeight,
|
||||
List<String>? translationVariables,
|
||||
String? text,
|
||||
bool underline = false})
|
||||
: super(
|
||||
text ??
|
||||
AppTranslations.of(context).text(translationKey,
|
||||
AppTranslations.of(context)!.text(translationKey,
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ class LocalLargeTitle extends Text {
|
||||
LocalLargeTitle(
|
||||
this.context,
|
||||
String translationKey, {
|
||||
Color color,
|
||||
List<String> translationVariables,
|
||||
Color? color,
|
||||
List<String>? translationVariables,
|
||||
}) : super(
|
||||
AppTranslations.of(context).text(translationKey,
|
||||
AppTranslations.of(context)!.text(translationKey,
|
||||
translationVariables: translationVariables),
|
||||
style: Provider.of<LanguageModel>(context).isEng
|
||||
? TextStyle(color: color)
|
||||
@@ -48,7 +48,7 @@ class LocalLargeTitle extends Text {
|
||||
class TextLocalStyle extends Text {
|
||||
final BuildContext context;
|
||||
TextLocalStyle(this.context, String text,
|
||||
{Color color, double fontSize, FontWeight fontWeight})
|
||||
{Color? color, double? fontSize, FontWeight? fontWeight})
|
||||
: super(text,
|
||||
style: Provider.of<LanguageModel>(context).isEng
|
||||
? TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user