I'm using firebase database and i want to show a certain widget if there was docs only. i tried this line but it's not the right one.
Visibility(
visible: controller.doc.isEmpty(),
CodePudding user response:
Not sure what controller.doc.isEmpty()
does but you want the widget to be visible if the doc is not empty. So you have to change it to:
Visibility(
visible: !controller.doc.isEmpty(),
)
CodePudding user response:
Try the following code:
Visibility(
visible: controller.doc.isNotEmpty(),
),