фиксы
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class LauncherVersionScope extends InheritedWidget {
|
||||
const LauncherVersionScope({
|
||||
super.key,
|
||||
required this.version,
|
||||
required super.child,
|
||||
});
|
||||
|
||||
final String version;
|
||||
|
||||
static String of(BuildContext context) {
|
||||
return context
|
||||
.dependOnInheritedWidgetOfExactType<LauncherVersionScope>()
|
||||
?.version ??
|
||||
'dev';
|
||||
}
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(LauncherVersionScope oldWidget) {
|
||||
return version != oldWidget.version;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user