how to run flutter app without taking so long?

136

Solution 1

Based on my personal experience, Flutter is rather demanding on your machine, make sure you have the right hardware.

I had a 8 gb of RAM and mechanical hard disk drive (HDD). The Gradle build would 15+ minutes.

I replaced my HDD with a Solid State Drive (SSD). And added an additional 8gb of RAM. Now the gradle build takes around 1 min.

Solution 2

Usually, the first time you run the application with flutter run, it takes a while to build the application.

From there, you can see your changes if you press lowercase r (hot reload) instantly. If you press uppercase R (hot restart), the application will restart instantly as well.

An actual rerun with flutter run is rarely needed, only if you add new packages to your app.

Share:
136
Helina
Author by

Helina

Updated on December 23, 2022

Comments

  • Helina
    Helina over 1 year

    well I'm new to flutter . I see that everytime I try to run the application it takes so long to update and show me the result , Although I'm using an emulator . I guess it is because of GRADLE . is there any way to minimize the wasted time ?

  • Helina
    Helina over 3 years
    thanks it really worked well with me . It only took seconds to update this time