copyWith method
QrGenerationOptions
copyWith({
- int? size,
- ErrorCorrectionLevel? errorCorrectionLevel,
- Color? foregroundColor,
- Color? backgroundColor,
- int? margin,
- Uint8List? logoData,
- double? logoSizeRatio,
- bool? roundedCorners,
- double? cornerRadius,
- List<
Color> ? gradientColors, - double? gradientDirection,
- bool? addBorder,
- int? borderWidth,
- Color? borderColor,
Creates a copy of this options with the given fields replaced
Implementation
QrGenerationOptions copyWith({
int? size,
ErrorCorrectionLevel? errorCorrectionLevel,
Color? foregroundColor,
Color? backgroundColor,
int? margin,
Uint8List? logoData,
double? logoSizeRatio,
bool? roundedCorners,
double? cornerRadius,
List<Color>? gradientColors,
double? gradientDirection,
bool? addBorder,
int? borderWidth,
Color? borderColor,
}) {
return QrGenerationOptions(
size: size ?? this.size,
errorCorrectionLevel: errorCorrectionLevel ?? this.errorCorrectionLevel,
foregroundColor: foregroundColor ?? this.foregroundColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
margin: margin ?? this.margin,
logoData: logoData ?? this.logoData,
logoSizeRatio: logoSizeRatio ?? this.logoSizeRatio,
roundedCorners: roundedCorners ?? this.roundedCorners,
cornerRadius: cornerRadius ?? this.cornerRadius,
gradientColors: gradientColors ?? this.gradientColors,
gradientDirection: gradientDirection ?? this.gradientDirection,
addBorder: addBorder ?? this.addBorder,
borderWidth: borderWidth ?? this.borderWidth,
borderColor: borderColor ?? this.borderColor,
);
}