Skip to content

SaltySpaghetti/fps_counter

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published