specOf static method

MorphSurfaceSpec specOf(
  1. BuildContext context
)

The declared surface model of the nearest enclosing MorphTag - render the visible surface from it instead of repeating the values.

Implementation

static MorphSurfaceSpec specOf(BuildContext context) {
  final MorphSurfaceSpec? spec = maybeSpecOf(context);
  assert(
    spec != null,
    'MorphTag.specOf called outside of a MorphTag subtree.',
  );
  return spec!;
}