Skip to content

Commit

Permalink
fix flutter/flutter#24720 warning from flutter analyze deprecated_m…
Browse files Browse the repository at this point in the history
…ember_use
  • Loading branch information
truongsinh committed Dec 9, 2018
1 parent e14f149 commit 63697a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/sentry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class SentryClient {
List<int> body = utf8.encode(json.encode(data));
if (compressPayload) {
headers['Content-Encoding'] = 'gzip';
body = GZIP.encode(body);
body = gzip.encode(body);
}

final Response response =
Expand Down
4 changes: 2 additions & 2 deletions test/sentry_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ void main() {

Map<String, dynamic> data;
if (compressPayload) {
data = json.decode(utf8.decode(GZIP.decode(body)));
data = json.decode(utf8.decode(gzip.decode(body)));
} else {
data = json.decode(utf8.decode(body));
}
final Map<String, dynamic> stacktrace = data.remove('stacktrace');
expect(stacktrace['frames'], const isInstanceOf<List>());
expect(stacktrace['frames'], const TypeMatcher<List>());
expect(stacktrace['frames'], isNotEmpty);

final Map<String, dynamic> topFrame =
Expand Down
2 changes: 1 addition & 1 deletion test/version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void main() {
group('sdkVersion', () {
test('matches that of pubspec.yaml', () {
final dynamic pubspec =
yaml.loadYaml(new File('pubspec.yaml').readAsStringSync());
yaml.loadYaml(new File('../pubspec.yaml').readAsStringSync());
expect(sdkVersion, pubspec['version']);
});
});
Expand Down

0 comments on commit 63697a2

Please sign in to comment.