PlatformOperationException constructor

PlatformOperationException({
  1. required String operation,
  2. required String userMessage,
  3. required String devMessage,
  4. String? code,
  5. dynamic details,
  6. Object? cause,
  7. StackTrace? stack,
  8. Map<String, dynamic> metadata = const {},
  9. Severity severity = Severity.error,
  10. bool isReportable = true,
})

Creates a platform exception describing the failed operation.

Implementation

PlatformOperationException({
  required this.operation,
  required super.userMessage,
  required super.devMessage,
  this.code,
  this.details,
  super.cause,
  super.stack,
  Map<String, dynamic> metadata = const {},
  super.severity,
  super.isReportable,
}) : super(
        metadata: {
          'operation': operation,
          if (code != null) 'code': code,
          if (details != null) 'details': details,
          ...metadata,
        },
      );