Skip to content

Commit

Permalink
[firebase_performance] Fix bug that prevented plugin to work with hot…
Browse files Browse the repository at this point in the history
… restart (#1763)
  • Loading branch information
bparrishMines authored Jun 20, 2019
1 parent 931c348 commit e513673
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/firebase_performance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0+2

* Fix bug preventing this plugin from working with hot restart.

## 0.3.0+1

* Automatically use version from pubspec.yaml when reporting usage to Firebase.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static void registerWith(Registrar registrar) {
@Override
public void onMethodCall(MethodCall call, MethodChannel.Result result) {
if (call.method.equals("FirebasePerformance#instance")) {
handlers.clear();
FlutterFirebasePerformance.getInstance(call, result);
} else {
final MethodChannel.MethodCallHandler handler = getHandler(call);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ - (instancetype)init {

- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result {
if ([@"FirebasePerformance#instance" isEqualToString:call.method]) {
[methodHandlers removeAllObjects];

NSNumber *handle = call.arguments[@"handle"];
FLTFirebasePerformance *performance = [FLTFirebasePerformance sharedInstance];

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_performance/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Flutter plugin for Google Performance Monitoring for Firebase, an a
iOS.
author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_performance
version: 0.3.0+1
version: 0.3.0+2

dependencies:
flutter:
Expand Down

0 comments on commit e513673

Please sign in to comment.