aves_mio18/lib/services/common/custom_exception.dart
2026-04-14 09:53:02 +02:00

27 lines
604 B
Dart

import 'package:flutter/services.dart';
class CustomPlatformException {
final String code;
final String? message;
final dynamic details;
final String? stacktrace;
CustomPlatformException({
required this.code,
this.message,
this.details,
this.stacktrace,
});
factory CustomPlatformException.fromStandard(PlatformException e) {
return CustomPlatformException(
code: e.code,
message: e.message,
details: e.details,
stacktrace: e.stacktrace,
);
}
@override
String toString() => '$runtimeType($code, $message, $details, $stacktrace)';
}