lemberfpsmonitor 0.0.1 copy "lemberfpsmonitor: ^0.0.1" to clipboard
lemberfpsmonitor: ^0.0.1 copied to clipboard

A Flutter package for fps monitoring.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lemberfpsmonitor/lemberfpsmonitor.dart';

void main() {
  //Enable this to measure your repaint regions
  //debugRepaintRainbowEnabled = true;
  runApp(Padding(
    padding: const EdgeInsets.only(top: 40),
    child: FPSMonitor(
      isEnabled: true,
      align: Alignment.topRight,
      onFpsChanged: (fps) {
        print("fps: $fps");
      },
      child: MaterialApp(
          debugShowCheckedModeBanner: false, home: Scaffold(body: MyApp())),
    ),
  ));
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(body: ListView.builder(itemBuilder: (context, index) {
      return Padding(
        padding: const EdgeInsets.all(8.0),
        child: Container(
          height: 100,
          color: Colors.red,
        ),
      );
    }));
  }
}
10
likes
0
pub points
65%
popularity

Publisher

unverified uploader

A Flutter package for fps monitoring.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on lemberfpsmonitor