fps_counter 1.0.0
fps_counter: ^1.0.0 copied to clipboard
A simple package to show the current FPS of your Flutter app.
Features #
- Real-time FPS counter
- Customizable display options
- Lightweight and easy to integrate
- Minimal performance overhead
- Compatible with the latest Flutter versions
Usage #
FpsController only #
final _controller = FpsController();
and then
//Access the fps value through the stream
_controller.stream.listen((fps) {
print('FPS: $fps');
});
FpsCounter Widget #
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
final _controller = FpsController();
@override
Widget build(BuildContext context) => Scaffold(
body: FpsCounter(
controller: _controller,
child: ListView.builder(
itemCount: 1000,
itemBuilder: (context, index) => ListTile(title: Text('Item $index')),
),
),
);
}
[result image]