Skip to content

Commit

Permalink
Merge pull request #107 from rollbar/onerror
Browse files Browse the repository at this point in the history
Fixed onError callback not being set on the Flutter framework
  • Loading branch information
matux authored Jul 27, 2023
2 parents a6497dc + ac51892 commit daba1fc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions rollbar_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion rollbar_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion rollbar_flutter/ios/rollbar_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion rollbar_flutter/lib/src/rollbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class RollbarFlutter {
transformer: (_) => PlatformTransformer(),
));

FlutterError.onError ??= onError;
if (onError != null) {
FlutterError.onError = onError;
}

await _platform.initialize(config: config);
await appRunner();
Expand Down
2 changes: 1 addition & 1 deletion rollbar_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit daba1fc

Please sign in to comment.