Skip to content

Commit 5a2f036

Browse files
authored
Move to pkg:dart_flutter_team_lints, require Dart 2.19 (#883)
1 parent 35b2cef commit 5a2f036

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+139
-161
lines changed

.github/workflows/cronet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
name: Install dependencies
3737
run: flutter pub get
3838
- name: Check formatting
39-
run: flutter format --output=none --set-exit-if-changed .
39+
run: dart format --output=none --set-exit-if-changed .
4040
if: always() && steps.install.outcome == 'success'
4141
- name: Analyze code
4242
run: flutter analyze --fatal-infos

.github/workflows/dart.yml

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis_options.yaml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:lints/recommended.yaml
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
22

33
analyzer:
44
language:
@@ -9,36 +9,20 @@ analyzer:
99
linter:
1010
rules:
1111
- avoid_bool_literals_in_conditional_expressions
12-
- avoid_catching_errors
1312
- avoid_classes_with_only_static_members
14-
- avoid_dynamic_calls
1513
- avoid_private_typedef_functions
1614
- avoid_returning_this
1715
- avoid_unused_constructor_parameters
1816
- cascade_invocations
1917
- comment_references
20-
- directives_ordering
2118
- join_return_with_assignment
22-
- lines_longer_than_80_chars
2319
- missing_whitespace_between_adjacent_strings
2420
- no_adjacent_strings_in_list
2521
- no_runtimeType_toString
26-
- omit_local_variable_types
27-
- only_throw_errors
28-
- prefer_asserts_in_initializer_lists
2922
- prefer_const_constructors
3023
- prefer_const_declarations
3124
- prefer_expression_function_bodies
3225
- prefer_relative_imports
33-
- prefer_single_quotes
34-
- sort_pub_dependencies
3526
- test_types_in_equals
36-
- throw_in_finally
37-
- type_annotate_public_apis
38-
- unawaited_futures
39-
- unnecessary_lambdas
40-
- unnecessary_parenthesis
41-
- unnecessary_statements
42-
- use_is_even_rather_than_modulo
4327
- use_string_buffers
4428
- use_super_parameters

pkgs/cronet_http/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.1-dev
2+
3+
* Require Dart 2.19
4+
15
## 0.2.0
26

37
* Restructure `package:cronet_http` to offer a

pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
/// Tests various [CronetEngine] configurations.
6+
library;
67

78
import 'dart:io';
89

pkgs/cronet_http/example/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin.
44
publish_to: 'none'
55

66
environment:
7-
sdk: ">=2.17.5 <3.0.0"
7+
sdk: ">=2.19.0 <3.0.0"
88

99
dependencies:
1010
cached_network_image: ^3.2.3
@@ -16,13 +16,14 @@ dependencies:
1616
http: ^0.13.5
1717

1818
dev_dependencies:
19-
flutter_lints: ^1.0.0
19+
dart_flutter_team_lints: ^1.0.0
2020
flutter_test:
2121
sdk: flutter
2222
http_client_conformance_tests:
2323
path: ../../http_client_conformance_tests/
2424
integration_test:
2525
sdk: flutter
26+
test: ^1.23.1
2627

2728
flutter:
2829
uses-material-design: true

pkgs/cronet_http/lib/cronet_http.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
/// After the above setup, calling [Client] methods or any of the
5151
/// `package:http` convenient functions (e.g. [get]) will result in
5252
/// [CronetClient] being used on Android.
53+
library;
5354

5455
import 'package:http/http.dart';
5556

pkgs/cronet_http/lib/src/cronet_client.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html)
1212
/// or
1313
/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html).
14+
library;
1415

1516
import 'dart:async';
1617

@@ -19,7 +20,7 @@ import 'package:http/http.dart';
1920

2021
import 'messages.dart' as messages;
2122

22-
late final _api = messages.HttpApi();
23+
final _api = messages.HttpApi();
2324

2425
final Finalizer<String> _cronetEngineFinalizer = Finalizer(_api.freeEngine);
2526

pkgs/cronet_http/lib/src/messages.dart

Lines changed: 8 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkgs/cronet_http/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: cronet_http
22
description: >
33
An Android Flutter plugin that provides access to the Cronet HTTP client.
4-
version: 0.2.0
4+
version: 0.2.1-dev
55
repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http
66

77
environment:
8-
sdk: ">=2.17.5 <3.0.0"
8+
sdk: ">=2.19.0 <3.0.0"
99
flutter: ">=3.0.0"
1010

1111
dependencies:
@@ -14,7 +14,7 @@ dependencies:
1414
http: ^0.13.4
1515

1616
dev_dependencies:
17-
lints: ^1.0.0
17+
dart_flutter_team_lints: ^1.0.0
1818
pigeon: ^3.2.3
1919
xml: ^6.1.0
2020
yaml_edit: ^2.0.3

pkgs/cronet_http/tool/prepare_for_embedded.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/// can be run to update package:cronet_http_embedded.
1919
///
2020
/// NOTE: This script modifies the above files in place.
21+
library;
2122

2223
import 'dart:io';
2324

pkgs/cupertino_http/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.2-dev
2+
3+
* Require Dart 2.19
4+
15
## 0.1.1
26

37
* Add a `URLSession.sessionDescription` field.

pkgs/cupertino_http/example/integration_test/error_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
@Skip('Error tests cannot currently be written. See comments in this file.')
6+
library;
67

78
import 'package:integration_test/integration_test.dart';
89
import 'package:test/test.dart';

pkgs/cupertino_http/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ publish_to: 'none'
66
version: 1.0.0+1
77

88
environment:
9-
sdk: ">=2.17.3 <3.0.0"
9+
sdk: ">=2.19.0 <3.0.0"
1010

1111
dependencies:
1212
cached_network_image: ^3.2.3
@@ -18,7 +18,7 @@ dependencies:
1818
http: ^0.13.5
1919

2020
dev_dependencies:
21-
flutter_lints: ^2.0.0
21+
dart_flutter_team_lints: ^1.0.0
2222
flutter_test:
2323
sdk: flutter
2424
http_client_conformance_tests:

pkgs/cupertino_http/lib/cupertino_http.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
/// task.resume();
7575
/// }
7676
/// ```
77+
library;
78+
7779
import 'package:http/http.dart';
7880

7981
import 'src/cupertino_client.dart';

0 commit comments

Comments
 (0)