another dart file. MyWidget equally has a button in its widget tree. Is it possible that when the button in MyWidget is tapped, the number in Text widget updates?
You might be wondering why I don't just paste the code of MyWidget directly in my widget tree. This is because I'm using MyWidget in multiple dart files
yah pass a function to MyWidget and call it there you you can look into state management
Обсуждают сегодня