Skip to content

Commit 82f94d2

Browse files
committed
Plugin publication fixes
1 parent 459c1ba commit 82f94d2

File tree

4 files changed

+6
-33
lines changed

4 files changed

+6
-33
lines changed

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'dart:convert';
33
import 'package:flutter/material.dart';
44
import 'package:http/http.dart';
55
import 'package:http_interceptor/http_interceptor.dart';
6-
import 'package:http_interceptor_example/credentials.dart'; // If you are going to run this example you need to replace the key.
6+
import 'credentials.dart'; // If you are going to run this example you need to replace the key.
77
import 'cities.dart'; // This is just a List of Maps that contains the suggested cities.
88

99
void main() => runApp(MyApp());

example/test/widget_test.dart

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1 @@
1-
// This is a basic Flutter widget test.
2-
//
3-
// To perform an interaction with a widget in your test, use the WidgetTester
4-
// utility that Flutter provides. For example, you can send tap and scroll
5-
// gestures. You can also use WidgetTester to find child widgets in the widget
6-
// tree, read text, and verify that the values of widget properties are correct.
71

8-
import 'package:flutter/material.dart';
9-
import 'package:flutter_test/flutter_test.dart';
10-
11-
import 'package:http_interceptor_example/main.dart';
12-
13-
void main() {
14-
testWidgets('Verify Platform version', (WidgetTester tester) async {
15-
// Build our app and trigger a frame.
16-
await tester.pumpWidget(MyApp());
17-
18-
// Verify that platform version is retrieved.
19-
expect(
20-
find.byWidgetPredicate(
21-
(Widget widget) => widget is Text &&
22-
widget.data.startsWith('Running on:'),
23-
),
24-
findsOneWidget,
25-
);
26-
});
27-
}

lib/models/request_data.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'dart:convert';
2-
import 'package:collection/collection.dart';
32
import 'package:http/http.dart';
43

54
import 'package:http_interceptor/http_methods.dart';
@@ -38,9 +37,9 @@ class RequestData {
3837
if (body is String) {
3938
request.body = body;
4039
} else if (body is List) {
41-
request.bodyBytes = DelegatingList.typed(body);
40+
request.bodyBytes = body.cast<int>();
4241
} else if (body is Map) {
43-
request.bodyFields = DelegatingMap.typed(body);
42+
request.bodyFields = body.cast<String, String>();
4443
} else {
4544
throw new ArgumentError('Invalid request body "$body".');
4645
}

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: http_interceptor
2-
description: A new flutter plugin project.
2+
description: A Plugin that allows you to intercept request and response objects and modify them if desired.
33
version: 0.0.1
4-
author:
5-
homepage:
4+
author: Alejandro Ulate (codingalecr) <[email protected]>
5+
homepage: https://github.com/CodingAleCR/http_interceptor
66

77
environment:
88
sdk: ">=2.1.0 <3.0.0"

0 commit comments

Comments
 (0)