isBundle function

bool isBundle(
  1. Object? v
)

Structural check of a configuration bundle: schema 1, numeric revision, flags object and segments object (the JS SDK's isBundle).

Implementation

bool isBundle(Object? v) {
  if (v is! Map) return false;
  final schema = v['schema'];
  final flags = v['flags'];
  final segments = v['segments'];
  return schema is num && schema == 1 && v['revision'] is num && flags is Map && (segments is Map || segments is List);
}