Files
nowser/lib/component/reload_inherited_widget.dart
2024-09-10 19:47:28 +08:00

21 lines
484 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class ReloadInheritedWidget extends InheritedWidget {
Function reload;
ReloadInheritedWidget({
required super.child,
required this.reload,
});
static ReloadInheritedWidget? of(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<ReloadInheritedWidget>();
}
@override
bool updateShouldNotify(covariant InheritedWidget oldWidget) {
return false;
}
}