import 'package:flutter/material.dart'; class ScoreWidget extends InheritedWidget { ScoreWidget({Key? key, required Widget child}) : super(key: key, child: child); int allInPlaceCount = 0; static ScoreWidget of(BuildContext context) { return context.dependOnInheritedWidgetOfExactType() as ScoreWidget; } @override bool updateShouldNotify(ScoreWidget oldWidget) => false; }