Introducing StatsFl, an FPS monitor for Flutter — gskinner blog
As we begin pushing Flutter to more platforms such as Desktop and Web, it is becoming increasingly important to quickly and easily measure performance of your application. While the built-in performance monitor gets the job done, it leaves a lot to be desired in terms of readability.
To help ease this problem, we have created StatsFl:
To use, just wrap your root view in the StatsFl widget:
With that simple change you’ll get a discrete FPS history chart in the top-left of your application!
For the most part the default options should be all you need but just in case, we’ve made it fairly configurable. The image below shows StatsFl in 3 configurations. As you can see, alignment, width and height are all adjustable. You can even toggle off showText for a minimalist mode (bottom).
Additionally, you can adjust the sampleTime and totalTime to be as long as you need. In this example, we’re calculating every .5 seconds, over a 15 second period, for a total of 30 samples.
sampleTime: .5, //Interval between fps calculations, in seconds.
totalTime: 15, //Total length of timeline, in seconds.
If you like the package, please toss a thumbs up to help increase the popularity!