|
|
|
|
|
|
using Color = Unity.UIWidgets.ui.Color; |
|
|
|
|
|
|
|
namespace Unity.UIWidgets.material { |
|
|
|
static class ThemeDataUtils { |
|
|
|
public partial class material_ { |
|
|
|
public static readonly Color _kLightThemeHighlightColor = new Color(0x66BCBCBC); |
|
|
|
|
|
|
|
public static readonly Color _kLightThemeSplashColor = new Color(0x66C8C8C8); |
|
|
|
|
|
|
iconTheme = iconTheme ?? |
|
|
|
(isDark ? new IconThemeData(color: Colors.white) : new IconThemeData(color: Colors.black87)); |
|
|
|
platform = platform ?? Application.platform; |
|
|
|
typography = typography ?? new Typography(); |
|
|
|
typography = typography ?? Typography.material2014(); |
|
|
|
TextTheme defaultTextTheme = isDark ? typography.white : typography.black; |
|
|
|
textTheme = defaultTextTheme.merge(textTheme); |
|
|
|
TextTheme defaultPrimaryTextTheme = primaryIsDark ? typography.white : typography.black; |
|
|
|
|
|
|
disabledColor = disabledColor ?? (isDark ? Colors.white30 : Colors.black38); |
|
|
|
highlightColor = highlightColor ?? |
|
|
|
(isDark |
|
|
|
? ThemeDataUtils._kDarkThemeHighlightColor |
|
|
|
: ThemeDataUtils._kLightThemeHighlightColor); |
|
|
|
? material_._kDarkThemeHighlightColor |
|
|
|
: material_._kLightThemeHighlightColor); |
|
|
|
? ThemeDataUtils._kDarkThemeSplashColor |
|
|
|
: ThemeDataUtils._kLightThemeSplashColor); |
|
|
|
? material_._kDarkThemeSplashColor |
|
|
|
: material_._kLightThemeSplashColor); |
|
|
|
|
|
|
|
sliderTheme = sliderTheme ?? SliderThemeData.fromPrimaryColors( |
|
|
|
primaryColor: primaryColor, |
|
|
|