Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Nov 2, 2023
1 parent 3f2ae7f commit 1eedd06
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Binary file added pkgs/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion pkgs/flutter_http_example/lib/http_client_factory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'dart:io';
import 'package:cupertino_http/cupertino_http.dart';
import 'package:http/http.dart';

Client http_client() {
Client httpClient() {
if (Platform.isIOS || Platform.isMacOS) {
return CupertinoClient.defaultSessionConfiguration();
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/flutter_http_example/lib/http_client_factory_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
import 'package:http/http.dart';
import 'package:fetch_client/fetch_client.dart';

Client http_client() => FetchClient(mode: RequestMode.cors);
Client httpClient() => FetchClient(mode: RequestMode.cors);
2 changes: 1 addition & 1 deletion pkgs/flutter_http_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'http_client_factory.dart'
if (dart.library.html) 'http_client_factory_web.dart';

void main() {
runWithClient(() => runApp(const BookSearchApp()), http_client);
runWithClient(() => runApp(const BookSearchApp()), httpClient);
}

class BookSearchApp extends StatelessWidget {
Expand Down
5 changes: 2 additions & 3 deletions pkgs/flutter_http_example/test/widget_test.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:flutter_test/flutter_test.dart';

import 'package:flutter_http_example/main.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('Test initial load', (WidgetTester tester) async {
Expand Down

0 comments on commit 1eedd06

Please sign in to comment.