Skip to content

Commit 52a2e5b

Browse files
committed
Fixed issue with request error in example main
1 parent a3f6295 commit 52a2e5b

5 files changed

Lines changed: 273 additions & 211 deletions

File tree

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ migrate_working_dir/
1919
# The .vscode folder contains launch configuration and tasks you configure in
2020
# VS Code which you may wish to be included in version control, so this line
2121
# is commented out by default.
22-
#.vscode/
22+
.vscode/
23+
24+
# DevTools (local)
25+
devtools_options.yaml
26+
**/devtools_options.yaml
2327

2428
# Flutter/Dart/Pub related
2529
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
@@ -29,3 +33,8 @@ migrate_working_dir/
2933
.flutter-plugins
3034
.flutter-plugins-dependencies
3135
build/
36+
37+
# Project local / release helpers
38+
/publish.sh
39+
/pre_publish.sh
40+
/FEATURE_IDEAS.md

example/lib/main.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,15 @@ class _MyHomePageState extends State<MyHomePage> {
5454
'/albums/1',
5555
];
5656

57-
late final Dio _jsonPlaceholderDio =
58-
Dio(BaseOptions(baseUrl: _jsonPlaceholder));
57+
late final Dio _jsonPlaceholderDio = Dio(
58+
BaseOptions(
59+
baseUrl: _jsonPlaceholder,
60+
headers: {
61+
'User-Agent': 'network-tracker-example',
62+
'Accept': 'application/json',
63+
},
64+
),
65+
);
5966

6067
late final Dio _dummyJsonDio = Dio(BaseOptions(baseUrl: _dummyJson));
6168

lib/src/services/postman_export_example.dart

Lines changed: 0 additions & 201 deletions
This file was deleted.

lib/src/services/postman_export_service.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ class PostmanExportService {
2626
);
2727

2828
return collection;
29-
30-
// if (prettyPrint) {
31-
// const encoder = JsonEncoder.withIndent(' ');
32-
// return encoder.convert(collection);
33-
// }
34-
35-
// return jsonEncode(collection);
3629
}
3730

3831
/// Builds the Postman collection structure.

0 commit comments

Comments
 (0)