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

@@ -54,7 +54,7 @@ Future<void> showConfirmDialog(
FlatButton(
color: Colors.grey[300],
child: Text(
AppTranslations.of(context).text('btn.cancel'),
AppTranslations.of(context)!.text('btn.cancel'),
style: Provider.of<LanguageModel>(context).isEng
? TextStyle()
: TextStyle(fontFamily: 'Myanmar3'),
@@ -67,7 +67,7 @@ Future<void> showConfirmDialog(
),
FlatButton(
color: primaryColor,
child: Text(AppTranslations.of(context).text('btn.ok'),
child: Text(AppTranslations.of(context)!.text('btn.ok'),
style: Provider.of<LanguageModel>(context).isEng
? TextStyle(
color: Colors.white,
@@ -367,7 +367,7 @@ Widget fcsButton(BuildContext context, String text,
}
String getLocalString(BuildContext context, String key) {
return AppTranslations.of(context).text(key);
return AppTranslations.of(context)!.text(key);
}
void showToast(GlobalKey key, String text) {