HookHints.immutable constructor

HookHints.immutable(
  1. Map<String, dynamic> hints
)

Implementation

factory HookHints.immutable(Map<String, dynamic> hints) {
  // Hints have their own top-level value contract (4.2.1); evaluation
  // contexts intentionally continue to accept null at every depth.
  for (final entry in hints.entries) {
    if (entry.value == null) {
      throw ArgumentError('hints.${entry.key}: hint values must not be null');
    }
  }
  return HookHints(hints: snapshotContextMap(hints, path: 'hints'));
}