Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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+3

* Fix bug that caused `invokeMethod` to fail with Dart code obfuscation

## 0.3.0+2

* Fix bug preventing this plugin from working with hot restart.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FirebasePerformance {
/// does not reflect whether instrumentation is enabled/disabled.
Future<bool> isPerformanceCollectionEnabled() {
return channel.invokeMethod<bool>(
'$FirebasePerformance#isPerformanceCollectionEnabled',
'FirebasePerformance#isPerformanceCollectionEnabled',
<String, dynamic>{'handle': _handle},
);
}
Expand All @@ -48,7 +48,7 @@ class FirebasePerformance {
/// application. By default, performance monitoring is enabled.
Future<void> setPerformanceCollectionEnabled(bool enable) {
return channel.invokeMethod<void>(
'$FirebasePerformance#setPerformanceCollectionEnabled',
'FirebasePerformance#setPerformanceCollectionEnabled',
<String, dynamic>{'handle': _handle, 'enable': enable},
);
}
Expand All @@ -62,7 +62,7 @@ class FirebasePerformance {
final int handle = _nextHandle++;

FirebasePerformance.channel.invokeMethod<void>(
'$FirebasePerformance#newTrace',
'FirebasePerformance#newTrace',
<String, dynamic>{'handle': _handle, 'traceHandle': handle, 'name': name},
);

Expand All @@ -74,7 +74,7 @@ class FirebasePerformance {
final int handle = _nextHandle++;

FirebasePerformance.channel.invokeMethod<void>(
'$FirebasePerformance#newHttpMetric',
'FirebasePerformance#newHttpMetric',
<String, dynamic>{
'handle': _handle,
'httpMetricHandle': handle,
Expand Down
12 changes: 6 additions & 6 deletions packages/firebase_performance/lib/src/http_metric.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class HttpMetric extends PerformanceAttributes {

_httpResponseCode = httpResponseCode;
FirebasePerformance.channel.invokeMethod<void>(
'$HttpMetric#httpResponseCode',
'HttpMetric#httpResponseCode',
<String, dynamic>{
'handle': _handle,
'httpResponseCode': httpResponseCode,
Expand All @@ -76,7 +76,7 @@ class HttpMetric extends PerformanceAttributes {

_requestPayloadSize = requestPayloadSize;
FirebasePerformance.channel.invokeMethod<void>(
'$HttpMetric#requestPayloadSize',
'HttpMetric#requestPayloadSize',
<String, dynamic>{
'handle': _handle,
'requestPayloadSize': requestPayloadSize,
Expand All @@ -93,7 +93,7 @@ class HttpMetric extends PerformanceAttributes {

_responseContentType = responseContentType;
FirebasePerformance.channel.invokeMethod<void>(
'$HttpMetric#responseContentType',
'HttpMetric#responseContentType',
<String, dynamic>{
'handle': _handle,
'responseContentType': responseContentType,
Expand All @@ -110,7 +110,7 @@ class HttpMetric extends PerformanceAttributes {

_responsePayloadSize = responsePayloadSize;
FirebasePerformance.channel.invokeMethod<void>(
'$HttpMetric#responsePayloadSize',
'HttpMetric#responsePayloadSize',
<String, dynamic>{
'handle': _handle,
'responsePayloadSize': responsePayloadSize,
Expand All @@ -129,7 +129,7 @@ class HttpMetric extends PerformanceAttributes {

_hasStarted = true;
return FirebasePerformance.channel.invokeMethod<void>(
'$HttpMetric#start',
'HttpMetric#start',
<String, dynamic>{'handle': _handle},
);
}
Expand All @@ -147,7 +147,7 @@ class HttpMetric extends PerformanceAttributes {

_hasStopped = true;
return FirebasePerformance.channel.invokeMethod<void>(
'$HttpMetric#stop',
'HttpMetric#stop',
<String, dynamic>{'handle': _handle},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class PerformanceAttributes {

_attributes[name] = value;
return FirebasePerformance.channel.invokeMethod<void>(
'$PerformanceAttributes#putAttribute',
'PerformanceAttributes#putAttribute',
<String, dynamic>{
'handle': _handle,
'name': name,
Expand All @@ -66,7 +66,7 @@ abstract class PerformanceAttributes {

_attributes.remove(name);
return FirebasePerformance.channel.invokeMethod<void>(
'$PerformanceAttributes#removeAttribute',
'PerformanceAttributes#removeAttribute',
<String, dynamic>{'handle': _handle, 'name': name},
);
}
Expand All @@ -85,7 +85,7 @@ abstract class PerformanceAttributes {
}

return FirebasePerformance.channel.invokeMapMethod<String, String>(
'$PerformanceAttributes#getAttributes',
'PerformanceAttributes#getAttributes',
<String, dynamic>{'handle': _handle},
);
}
Expand Down
10 changes: 5 additions & 5 deletions packages/firebase_performance/lib/src/trace.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Trace extends PerformanceAttributes {

_hasStarted = true;
return FirebasePerformance.channel.invokeMethod<void>(
'$Trace#start',
'Trace#start',
<String, dynamic>{'handle': _handle},
);
}
Expand All @@ -70,7 +70,7 @@ class Trace extends PerformanceAttributes {

_hasStopped = true;
return FirebasePerformance.channel.invokeMethod<void>(
'$Trace#stop',
'Trace#stop',
<String, dynamic>{'handle': _handle},
);
}
Expand All @@ -88,7 +88,7 @@ class Trace extends PerformanceAttributes {
_metrics.putIfAbsent(name, () => 0);
_metrics[name] += value;
return FirebasePerformance.channel.invokeMethod<void>(
'$Trace#incrementMetric',
'Trace#incrementMetric',
<String, dynamic>{'handle': _handle, 'name': name, 'value': value},
);
}
Expand All @@ -103,7 +103,7 @@ class Trace extends PerformanceAttributes {

_metrics[name] = value;
return FirebasePerformance.channel.invokeMethod<void>(
'$Trace#setMetric',
'Trace#setMetric',
<String, dynamic>{'handle': _handle, 'name': name, 'value': value},
);
}
Expand All @@ -116,7 +116,7 @@ class Trace extends PerformanceAttributes {
if (_hasStopped) return Future<int>.value(_metrics[name] ?? 0);

return FirebasePerformance.channel.invokeMethod<int>(
'$Trace#getMetric',
'Trace#getMetric',
<String, dynamic>{'handle': _handle, 'name': name},
);
}
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 <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_performance
version: 0.3.0+2
version: 0.3.0+3

dependencies:
flutter:
Expand Down