mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
21 lines
484 B
Dart
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;
|
|
}
|
|
}
|