performance_fps library

do what @author yulun @since 2020-07-23 15:59

Classes

BindingFps
do what @author yulun @since 2020-07-17 11:36 这个统计方式和fps_computer里的不一样,通过监听WidgetsBinding的handleBeginFrame和handleDrawFrame实现 handleBeginFrame Called by the engine to prepare the framework to produce a new frame. handleDrawFrame Called by the engine to produce a new frame. 在一秒内计算从begin->draw调用了多少次,次数就是帧数,如果帧数少于手机的渲染帧数,会认为丢失了多少帧 参考文章 https://developer.aliyun.com/article/699875
DebugLog
do what @author yulun @since 2020-07-21 19:17
Fps
fps 获取 官方推荐的方式 SchedulerBinding.instance.addTimingsCallback 注意不能和window.onReportTimings一起用,会冲突 其帧率计算方式为 FPS=实际绘制帧数*fpsHz(一般是60hz,也有90,120的)/(实际绘制帧数+丢帧数) 参考文章 https://yrom.net/blog/2019/08/01/how-to-get-fps-in-flutter-app-codes/
FpsPlugin

Typedefs

FpsCallback = void Function(double fps, double dropCount)
do what @author yulun @since 2020-07-17 19:03