24 lines
685 B
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;
|
|
}
|
|
}
|