null safety
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user