my flutter app keeps rebuilding itself when i navigate between screens on my bottom navigation

367 views
Skip to first unread message

Macphail Magwira

unread,
Oct 2, 2020, 4:19:04 PM10/2/20
to Flutter Development (flutter-dev)
my app keeps rebulding itself when i try to navigate between pages on the bottom navigation, it becomes a problem when i am trying to run a function only once when the user opens the app, but my app keeps rebuilding the homescreen, i have three screens, the third screen doesnt rebuild, only homescreen,i tried deleting any init state or dispose function to see if that was the cause but no luck, i need it to stop rebuilding so many times within the app because i have functions that should run only once        

Suzuki Tomohiro

unread,
Oct 2, 2020, 5:17:36 PM10/2/20
to Flutter Development (flutter-dev)
Can you share minimum reproducible project as a GitHub project?

On Fri, Oct 2, 2020 at 16:19 Macphail Magwira <macphail...@gmail.com> wrote:
my app keeps rebulding itself when i try to navigate between pages on the bottom navigation, it becomes a problem when i am trying to run a function only once when the user opens the app, but my app keeps rebuilding the homescreen, i have three screens, the third screen doesnt rebuild, only homescreen,i tried deleting any init state or dispose function to see if that was the cause but no luck, i need it to stop rebuilding so many times within the app because i have functions that should run only once        









--


You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.


To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/80b6bf9a-e682-4e29-8a61-8795a1dbee03n%40googlegroups.com.


Macphail Magwira

unread,
Oct 3, 2020, 3:28:19 AM10/3/20
to Flutter Development (flutter-dev)

Macphail Magwira

unread,
Oct 3, 2020, 3:49:36 AM10/3/20
to Flutter Development (flutter-dev)
the page that keeps rebuilding itself is homepage.dart

Suzuki Tomohiro

unread,
Oct 3, 2020, 11:35:35 AM10/3/20
to Flutter Development (flutter-dev)
The GitHub repository is not accessible to me. (404 error)

Also, please ensure you get rid of unnecessary code that is irrelevant to the rebuilding problem before sharing the copy of the project.

Macphail Magwira

unread,
Oct 3, 2020, 11:46:38 AM10/3/20
to Flutter Development (flutter-dev)
ok please hold on

Macphail Magwira

unread,
Oct 3, 2020, 11:47:15 AM10/3/20
to Flutter Development (flutter-dev)

Macphail Magwira

unread,
Oct 3, 2020, 11:47:39 AM10/3/20
to Flutter Development (flutter-dev)
i also posted it here on stack overflow
Reply all
Reply to author
Forward
0 new messages