requireStoreRefScope function
Returns scope or throws when a LevitRef is used before scope attachment.
Implementation
@visibleForTesting
LevitScope requireStoreRefScope(LevitScope? scope) {
if (scope == null) {
throw StateError(
'Store ref has no owning scope. Resolve the store via Levit.put/find '
'or LevitStore.findIn before using LevitRef APIs.',
);
}
return scope;
}