diff --git a/analysis_options.yaml b/analysis_options.yaml index 8fbd2e4..4544442 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:lints/recommended.yaml +include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: errors: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 08c02c0..35107a7 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 publish_to: none environment: - sdk: ^3.0.0 + sdk: ^3.2.0 dependencies: platform: diff --git a/lib/src/testing/fake_platform.dart b/lib/src/testing/fake_platform.dart index 43743d6..0c028ca 100644 --- a/lib/src/testing/fake_platform.dart +++ b/lib/src/testing/fake_platform.dart @@ -69,8 +69,7 @@ class FakePlatform extends Platform { /// [json] must be a JSON string that matches the encoding produced by /// [toJson]. factory FakePlatform.fromJson(String json) { - final Map map = - const JsonDecoder().convert(json) as Map; + final map = const JsonDecoder().convert(json) as Map; return FakePlatform( numberOfProcessors: map['numberOfProcessors'] as int?, pathSeparator: map['pathSeparator'] as String?, @@ -92,7 +91,8 @@ class FakePlatform extends Platform { ); } - /// Creates a new [FakePlatform] from this one, with some properties replaced by the given properties. + /// Creates a new [FakePlatform] from this one, with some properties replaced + /// by the given properties. FakePlatform copyWith({ int? numberOfProcessors, String? pathSeparator, diff --git a/pubspec.yaml b/pubspec.yaml index f047ebf..0c60d5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ environment: sdk: ^3.2.0 dev_dependencies: - lints: ^4.0.0 + dart_flutter_team_lints: ^3.1.0 test: ^1.16.8 topics: diff --git a/test/fake_platform_test.dart b/test/fake_platform_test.dart index 08795ce..1aa7cbf 100644 --- a/test/fake_platform_test.dart +++ b/test/fake_platform_test.dart @@ -43,7 +43,7 @@ void main() { }); test('convertsPropertiesToMutable', () { - final String key = fake.environment.keys.first; + final key = fake.environment.keys.first; expect(fake.environment[key], local.environment[key]); fake.environment[key] = 'FAKE'; @@ -62,7 +62,7 @@ void main() { }); test('overrides a value, but leaves others intact', () { - final FakePlatform copy = fake.copyWith( + final copy = fake.copyWith( numberOfProcessors: -1, ); expect(copy.numberOfProcessors, equals(-1)); @@ -96,7 +96,7 @@ void main() { stdoutSupportsAnsi: true, localeName: 'local', ); - final FakePlatform copy = fake.copyWith( + final copy = fake.copyWith( numberOfProcessors: local.numberOfProcessors, pathSeparator: local.pathSeparator, operatingSystem: local.operatingSystem, @@ -119,7 +119,7 @@ void main() { group('json', () { test('fromJson', () { - final String json = io.File('test/platform.json').readAsStringSync(); + final json = io.File('test/platform.json').readAsStringSync(); fake = FakePlatform.fromJson(json); expect(fake.numberOfProcessors, 8); expect(fake.pathSeparator, '/'); @@ -147,7 +147,7 @@ void main() { }); test('Throws when unset non-null values are read', () { - final FakePlatform platform = FakePlatform(); + final platform = FakePlatform(); expect(() => platform.numberOfProcessors, throwsA(isStateError)); expect(() => platform.pathSeparator, throwsA(isStateError));