combine static method
Combines multiple MixScope instances into a single scope.
Implementation
static MixScope combine({
required Iterable<MixScope> scopes,
required Widget child,
Key? key,
}) {
if (scopes.isEmpty) return MixScope.empty(key: key, child: child);
final combined = scopes.fold<MixScope>(
MixScope.empty(child: child),
(previous, scope) => previous.merge(scope),
);
return MixScope._(
key: key,
tokens: combined._tokens,
orderOfModifiers: combined.orderOfModifiers,
child: child,
);
}