copyWith method

ErrorPageConfig copyWith({
  1. String? title,
  2. String? description,
  3. String? btnText,
  4. VoidCallback? onRetry,
  5. Widget? customButton,
  6. Widget? customView,
})

Creates a copy of this config with the given fields replaced.

Implementation

ErrorPageConfig copyWith({
  String? title,
  String? description,
  String? btnText,
  VoidCallback? onRetry,
  Widget? customButton,
  Widget? customView,
}) {
  return ErrorPageConfig(
    title: title ?? this.title,
    description: description ?? this.description,
    btnText: btnText ?? this.btnText,
    onRetry: onRetry ?? this.onRetry,
    customButton: customButton ?? this.customButton,
    customView: customView ?? this.customView,
  );
}