From e4270346134f64c839822f2108601bbd9d550751 Mon Sep 17 00:00:00 2001 From: Matias Pequeno Date: Thu, 27 Jul 2023 16:13:43 -0300 Subject: [PATCH 1/2] Fixed onError callback not being set on the Flutter framework --- rollbar_flutter/lib/src/rollbar.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rollbar_flutter/lib/src/rollbar.dart b/rollbar_flutter/lib/src/rollbar.dart index 35c4482..76e83c6 100644 --- a/rollbar_flutter/lib/src/rollbar.dart +++ b/rollbar_flutter/lib/src/rollbar.dart @@ -59,7 +59,9 @@ class RollbarFlutter { transformer: (_) => PlatformTransformer(), )); - FlutterError.onError ??= onError; + if (onError != null) { + FlutterError.onError = onError; + } await _platform.initialize(config: config); await appRunner(); From ac51892f19788d7b9cab1b2dd7cb07c51f7b8a65 Mon Sep 17 00:00:00 2001 From: Matias Pequeno Date: Thu, 27 Jul 2023 16:31:18 -0300 Subject: [PATCH 2/2] Changelog and version bump --- rollbar_flutter/CHANGELOG.md | 4 ++++ rollbar_flutter/example/pubspec.yaml | 2 +- rollbar_flutter/ios/rollbar_flutter.podspec | 2 +- rollbar_flutter/pubspec.yaml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rollbar_flutter/CHANGELOG.md b/rollbar_flutter/CHANGELOG.md index 1bc8490..eaccd53 100644 --- a/rollbar_flutter/CHANGELOG.md +++ b/rollbar_flutter/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.4.1 + +- Fixed the SDK not hooking properly to the Flutter framework `onError` callback. + ## 1.4.0 - Updated the Rollbar Apple SDK used by this SDK to handle native-level errors and crashes to the latest 3.x version. diff --git a/rollbar_flutter/example/pubspec.yaml b/rollbar_flutter/example/pubspec.yaml index 19d5d19..ccca932 100644 --- a/rollbar_flutter/example/pubspec.yaml +++ b/rollbar_flutter/example/pubspec.yaml @@ -1,6 +1,6 @@ name: rollbar_flutter_example description: Demonstrates how to use the rollbar_flutter plugin. -version: 1.4.0 +version: 1.4.1 publish_to: 'none' # Remove this line if you wish to publish to pub.dev diff --git a/rollbar_flutter/ios/rollbar_flutter.podspec b/rollbar_flutter/ios/rollbar_flutter.podspec index 88d46ec..76ea727 100644 --- a/rollbar_flutter/ios/rollbar_flutter.podspec +++ b/rollbar_flutter/ios/rollbar_flutter.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'rollbar_flutter' - s.version = '1.4.0' + s.version = '1.4.1' s.summary = 'Connect your Flutter applications to Rollbar for error reporting.' s.description = <<-DESC Connect your Flutter applications to Rollbar for error reporting. diff --git a/rollbar_flutter/pubspec.yaml b/rollbar_flutter/pubspec.yaml index 172a242..2809b3e 100644 --- a/rollbar_flutter/pubspec.yaml +++ b/rollbar_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: rollbar_flutter description: Connect your Flutter applications to Rollbar for error reporting. -version: 1.4.0 +version: 1.4.1 homepage: https://www.rollbar.com documentation: https://docs.rollbar.com/docs/flutter#flutter repository: https://github.com/rollbar/rollbar-flutter