combine static method

Style combine(
  1. Iterable<Style> mixes
)

Combines a positional list of mixes into a single Style.

This factory constructor iterates through the list of mixes params, merging each mix with the previous mix and returning the final combined Style.

Example:

final combinedStyle = Style.combine([style1, style2, style3]);

Implementation

static Style combine(Iterable<Style> mixes) {
  return mixes.isEmpty
      ? const Style.empty()
      : mixes.reduce((combinedStyle, mix) => combinedStyle.merge(mix));
}