themeStyleOf method
Implementation
SwitchFieldTheme themeStyleOf(BuildContext context) {
final theme = Theme.of(context);
final formTheme = FormTheme.of(context);
final fieldTheme = formTheme.switchTheme;
final resolver = FieldThemeResolver(theme, formTheme, fieldTheme);
final switchTheme = fieldTheme.switchTheme ?? theme.switchTheme;
return SwitchFieldTheme(
decorationTheme: resolver.decorationTheme,
textStyle: textStyle ?? resolver.textStyle,
textColor: textColor ?? resolver.textColor,
switchTheme: switchTheme.copyWith(
thumbColor: thumbColor,
trackColor: trackColor,
materialTapTargetSize: materialTapTargetSize,
mouseCursor: mouseCursor,
overlayColor: overlayColor,
splashRadius: splashRadius,
),
controlAffinity: controlAffinity ??
fieldTheme.controlAffinity ??
FieldBlocBuilderControlAffinity.leading,
);
}