from static method
Implementation
static TWidgetTheme from(bool isDarkMode, Color color, TVariant type) {
final key = _cacheKey(color, type, isDarkMode);
return _baseThemeCache.putIfAbsent(key, () {
return switch (type) {
TVariant.solid => solidTheme(color, isDarkMode),
TVariant.tonal => tonalTheme(color, isDarkMode),
TVariant.outline => outlineTheme(color, isDarkMode),
TVariant.softOutline => softOutlineTheme(color, isDarkMode),
TVariant.filledOutline => filledOutlineTheme(color, isDarkMode),
TVariant.text => textTheme(color, isDarkMode),
TVariant.softText => softTextTheme(color, isDarkMode),
TVariant.filledText => filledTextTheme(color, isDarkMode),
};
});
}