copyWith method
Creates a copy of this theme with the given fields replaced.
Implementation
ThemeData copyWith({
Color? primaryColor,
Color? backgroundColor,
Color? textColor,
Color? selectedColor,
Color? borderColor,
Color? dividerColor,
}) {
return ThemeData(
primaryColor: primaryColor ?? this.primaryColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
textColor: textColor ?? this.textColor,
selectedColor: selectedColor ?? this.selectedColor,
borderColor: borderColor ?? this.borderColor,
dividerColor: dividerColor ?? this.dividerColor,
);
}