copyWith method
- DiagnosticsNode? context,
- Object? exception,
- InformationCollector? informationCollector,
- String? library,
- bool? silent,
- StackTrace? stack,
- IterableFilter<
String> ? stackFilter,
Creates a copy of the error details but with the given fields replaced with new values.
Implementation
FlutterErrorDetails copyWith({
DiagnosticsNode? context,
Object? exception,
InformationCollector? informationCollector,
String? library,
bool? silent,
StackTrace? stack,
IterableFilter<String>? stackFilter,
}) {
return FlutterErrorDetails(
context: context ?? this.context,
exception: exception ?? this.exception,
informationCollector: informationCollector ?? this.informationCollector,
library: library ?? this.library,
silent: silent ?? this.silent,
stack: stack ?? this.stack,
stackFilter: stackFilter ?? this.stackFilter,
);
}