maybeChange<T> static method
Optionally find the property of the given type from the context. Returns null if the data is not found.
TThe type of the data.contextThe build context.keyThe data key.
Implementation
static bool maybeChange<T>(BuildContext context, Symbol key, T data) {
final property = maybeFindProperty<T>(context, key);
if (property == null) {
return false;
}
property.value = data;
return true;
}