f_count 0.2.0 f_count: ^0.2.0 copied to clipboard
A dart equivalent of console.count() in JS. This can be used to check for unwanted re-renders inside the build method of a widget
import 'package:example/bad_homepage.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const BadHomePage(title: 'Flutter Demo Home Page'),
);
}
}