null safety

This commit is contained in:
Phaung Phaung
2021-09-10 15:23:13 +06:30
parent 5c5e47b9ad
commit 376153e22f
14 changed files with 80 additions and 66 deletions

View File

@@ -28,7 +28,8 @@ class _FAQDetailPageState extends State<FAQDetailPage> {
@override
Widget build(BuildContext context) {
faq = context.select((FAQModel m) => m.getFAQ(widget.faq.id));
if(widget.faq.id != null)
faq = context.select((FAQModel m) => m.getFAQ(widget.faq.id!));
if (faq == null) return Text("Deleted");
bool isEditable = context.select((MainModel m) => m.faqEditable());