aves_mio/lib/services/common/custom_exception.dart
Fabio Micheluz 2c988f959b
Some checks are pending
Quality check / Flutter analysis (push) Waiting to run
Quality check / CodeQL analysis (java-kotlin) (push) Waiting to run
first commit
2026-02-19 13:25:23 +01: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)';
}