of static method
- BuildContext context
Accesses current CupThread theme colors.
Implementation
static CupThreadColors of(BuildContext context) {
final scope = context.dependOnInheritedWidgetOfExactType<CupThreadThemeScope>();
if (scope != null) return scope.colors;
final isDark = Theme.of(context).brightness == Brightness.dark;
return CupThreadColors.resolve(SdkTheme.system, isDarkMode: isDark);
}