Skip to content
Open
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 CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [0.3.1-dev.4]

* bump up firebase_performance

# [0.3.1-dev.3]

* Update Dependencies (thx abahnj)
Expand Down
6 changes: 3 additions & 3 deletions lib/src/dio_firebase_performance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DioFirebasePerformanceInterceptor extends Interceptor {
RequestOptions options, RequestInterceptorHandler handler) async {
try {
final metric = FirebasePerformance.instance.newHttpMetric(
options.uri.normalized(), options.method.asHttpMethod()!);
options.uri.normalized(), options.method.asHttpMethod());

final requestKey = options.extra.hashCode;
_map[requestKey] = metric;
Expand Down Expand Up @@ -115,7 +115,7 @@ extension _UriHttpMethod on Uri {
}

extension _StringHttpMethod on String {
HttpMethod? asHttpMethod() {
HttpMethod asHttpMethod() {
switch (toUpperCase()) {
case "POST":
return HttpMethod.Post;
Expand All @@ -130,7 +130,7 @@ extension _StringHttpMethod on String {
case "OPTIONS":
return HttpMethod.Options;
default:
return null;
return HttpMethod.Trace;
}
}
}
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dio_firebase_performance
description: A new Flutter package project.
version: 0.3.1-dev.3
version: 0.3.1-dev.4
homepage: https://github.com/eyeem/dio_firebase_performance

environment:
Expand All @@ -9,8 +9,8 @@ environment:
dependencies:
flutter:
sdk: flutter
dio: ^4.0.0
firebase_performance: ^0.7.0
dio: ^4.0.0-beta7
firebase_performance: ^0.8.2+3

dev_dependencies:
flutter_test:
Expand Down