CalseeThemeController constructor

CalseeThemeController({
  1. Iterable<ThemeFamily>? families,
  2. Object? savedState,
  3. int? seed,
  4. bool accessible = false,
})

A feed limited to families (all families when null or empty), restored from savedState when given, otherwise starting at seed (a random one when null).

accessible keeps only themes that also pass the stricter contrast checks (the Accessible themes setting in Calsee).

Implementation

CalseeThemeController({
  Iterable<ThemeFamily>? families,
  Object? savedState,
  int? seed,
  bool accessible = false,
}) : _feed = savedState == null
         ? ThemeFeed(feedSeed: seed ?? ThemeFeed.randomFeedSeed())
         : ThemeFeed.fromJson(savedState),
     _accessible = accessible {
  if (families != null) this.families = families;
}