Fix bugs
This commit is contained in:
@@ -20,6 +20,7 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
Future<void> show(BuildContext context) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => this,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class SentryLoggyIntegration extends LoggyPrinter
|
||||
|
||||
@override
|
||||
Future<void> onLog(LogRecord record) async {
|
||||
if (!canSendEvent(record.error)) return;
|
||||
if (!canLogEvent(record.error)) return;
|
||||
|
||||
if (_shouldLog(record.level, _minEventLevel)) {
|
||||
await _hub.captureEvent(
|
||||
|
||||
@@ -15,7 +15,13 @@ bool canSendEvent(dynamic throwable) {
|
||||
UnexpectedFailure(:final error) => canSendEvent(error),
|
||||
DioException _ => false,
|
||||
SocketException _ => false,
|
||||
ExpectedException _ => false,
|
||||
ExpectedFailure _ => false,
|
||||
ExpectedMeasuredFailure _ => false,
|
||||
_ => true,
|
||||
};
|
||||
}
|
||||
|
||||
bool canLogEvent(dynamic throwable) => switch (throwable) {
|
||||
ExpectedMeasuredFailure _ => true,
|
||||
_ => canSendEvent(throwable),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user