ente/lib/states/location_screen_state.dart

24 lines
685 B
Dart

import "package:flutter/material.dart";
import 'package:photos/models/location_tag/location_tag.dart';
class InheritedLocationScreenState extends InheritedWidget {
final LocationTag locationTag;
const InheritedLocationScreenState(
this.locationTag, {
super.key,
required super.child,
});
static final memoryCountNotifier = ValueNotifier<int?>(null);
static InheritedLocationScreenState of(BuildContext context) {
return context
.dependOnInheritedWidgetOfExactType<InheritedLocationScreenState>()!;
}
@override
bool updateShouldNotify(covariant InheritedLocationScreenState oldWidget) {
return oldWidget.locationTag != locationTag;
}
}