maybeIdOf static method

Object? maybeIdOf(
  1. BuildContext context
)

Like idOf, but null outside a tag subtree.

Implementation

static Object? maybeIdOf(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<_MorphTagIdScope>()?.id;
}