null safety

This commit is contained in:
phyothandar
2021-09-10 15:22:11 +06:30
parent 51a5fe0740
commit c90661b262
24 changed files with 194 additions and 193 deletions

View File

@@ -9,11 +9,11 @@ typedef BtnCallback();
/// TaskButton is used to navigate to eash task
class TaskButton extends StatelessWidget {
final String titleKey;
final IconData icon;
final BtnCallback btnCallback;
final String? titleKey;
final IconData? icon;
final BtnCallback? btnCallback;
const TaskButton(this.titleKey, {Key key, this.icon, this.btnCallback})
const TaskButton(this.titleKey, {Key? key, this.icon, this.btnCallback})
: super(key: key);
@override
@@ -45,7 +45,7 @@ class TaskButton extends StatelessWidget {
Container(
height: 45,
alignment: Alignment.topCenter,
child: Text(AppTranslations.of(context).text(titleKey),
child: Text(AppTranslations.of(context)!.text(titleKey!),
textAlign: TextAlign.center,
style: languageModel.isEng
? TextStyle(