0

When i try to display all the data from the variable in the text, it just doesnt work when i print the variable it returns the correct values can someone help me ?

This is the code:

email = mail.value
    if not email == "":
        search_filter = {"email" : email}
        response = collection.find(search_filter)
        for alimentos in response:
            food = alimentos['alimento']
            vencimento = alimentos['vencimento']
            
            
            data = str("Alimentos de : " + email +  ": " + "\n" + food + " "+ "Vencimento : " + vencimento)
            print(data)

now the text part:

def bs_close(e):
            bs2.open = False
            bs2.update()
        bs2 = BottomSheet(
        Container(
            Column(
                [
                    Text(data, size=10, weight="bold", expand=True),
                    ElevatedButton("Ok", on_click=bs_close),
                ],
                alignment= MainAxisAlignment.CENTER,
                expand=True
            ),
            
            padding=10,
        ),
        open=True,
    )
        page.overlay.append(bs2)
        page.update()
Renzo-M
  • 21
  • 3

0 Answers0