dynamic static method

RadixColorScales dynamic(
  1. BuildContext context, {
  2. Brightness? brightness,
})

Pass the BuildContext to current the theme specific color

Implementation

static RadixColorScales dynamic(
  BuildContext context, {
  Brightness? brightness,
}) {
  final theme = Theme.of(context);
  return (brightness ?? theme.brightness) == Brightness.dark
      ? RadixColorsDark()
      : RadixColorsLight();
}