Remove deprecated CupertinoTextThemeData.brightness (#72017)
This commit is contained in:
parent
1129e6f86c
commit
e9a8315fd2
@ -42,6 +42,7 @@ analyzer:
|
||||
# see https://github.com/dart-lang/sdk/issues/28463
|
||||
- "lib/i18n/messages_*.dart"
|
||||
- "lib/src/http/**"
|
||||
- "test_fixes/**"
|
||||
|
||||
linter:
|
||||
rules:
|
||||
|
@ -644,6 +644,18 @@ Future<void> _runFrameworkTests() async {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> runFixTests() async {
|
||||
final List<String> args = <String>[
|
||||
'fix',
|
||||
'--compare-to-golden',
|
||||
];
|
||||
await runCommand(
|
||||
dart,
|
||||
args,
|
||||
workingDirectory: path.join(flutterRoot, 'packages', 'flutter', 'test_fixes'),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> runPrivateTests() async {
|
||||
final List<String> args = <String>[
|
||||
'run',
|
||||
@ -702,6 +714,7 @@ Future<void> _runFrameworkTests() async {
|
||||
options: <String>['--enable-vmservice'],
|
||||
tableData: bigqueryApi?.tabledata,
|
||||
);
|
||||
await runFixTests();
|
||||
await runPrivateTests();
|
||||
const String httpClientWarning =
|
||||
'Warning: At least one test in this suite creates an HttpClient. When\n'
|
||||
|
36
packages/flutter/lib/fix_data.yaml
Normal file
36
packages/flutter/lib/fix_data.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
# Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# TODO(Piinks): Add link to public user guide when available.
|
||||
|
||||
# Please add new fixes to the top of the file, separated by one blank line
|
||||
# from other fixes. In a comment, include a link to the PR where the change
|
||||
# requiring the fix was made.
|
||||
|
||||
version: 1
|
||||
transforms:
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/41859
|
||||
- title: 'Remove brightness'
|
||||
date: 2020-12-10
|
||||
element:
|
||||
uris: [ 'cupertino.dart' ]
|
||||
constructor: ''
|
||||
inClass: 'CupertinoTextThemeData'
|
||||
changes:
|
||||
- kind: 'removeParameter'
|
||||
name: 'brightness'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/41859
|
||||
- title: 'Remove brightness'
|
||||
date: 2020-12-10
|
||||
element:
|
||||
uris: [ 'cupertino.dart' ]
|
||||
method: 'copyWith'
|
||||
inClass: 'CupertinoTextThemeData'
|
||||
changes:
|
||||
- kind: 'removeParameter'
|
||||
name: 'brightness'
|
||||
|
||||
# Before adding a new fix: read instructions at the top of this file.
|
@ -124,12 +124,6 @@ class CupertinoTextThemeData with Diagnosticable {
|
||||
/// unspecified.
|
||||
const CupertinoTextThemeData({
|
||||
Color primaryColor = CupertinoColors.systemBlue,
|
||||
// ignore: avoid_unused_constructor_parameters, the parameter is deprecated.
|
||||
@Deprecated(
|
||||
'This argument no longer does anything. You can remove it. '
|
||||
'This feature was deprecated after v1.10.14.'
|
||||
)
|
||||
Brightness? brightness,
|
||||
TextStyle? textStyle,
|
||||
TextStyle? actionTextStyle,
|
||||
TextStyle? tabLabelTextStyle,
|
||||
@ -230,11 +224,6 @@ class CupertinoTextThemeData with Diagnosticable {
|
||||
/// specified overrides.
|
||||
CupertinoTextThemeData copyWith({
|
||||
Color? primaryColor,
|
||||
@Deprecated(
|
||||
'This argument no longer does anything. You can remove it. '
|
||||
'This feature was deprecated after v1.10.14.'
|
||||
)
|
||||
Brightness? brightness,
|
||||
TextStyle? textStyle,
|
||||
TextStyle? actionTextStyle,
|
||||
TextStyle? tabLabelTextStyle,
|
||||
|
0
packages/flutter/test_fixes/.dartignore
Normal file
0
packages/flutter/test_fixes/.dartignore
Normal file
1
packages/flutter/test_fixes/analysis_options.yaml
Normal file
1
packages/flutter/test_fixes/analysis_options.yaml
Normal file
@ -0,0 +1 @@
|
||||
# This ensures that parent analysis options do not accidentally break the fix tests.
|
11
packages/flutter/test_fixes/cupertino.dart
Normal file
11
packages/flutter/test_fixes/cupertino.dart
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2014 The Flutter Authors. 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/cupertino.dart';
|
||||
|
||||
void main() {
|
||||
// Change made in https://github.com/flutter/flutter/pull/41859
|
||||
const CupertinoTextThemeData themeData = CupertinoTextThemeData(brightness: Brightness.dark);
|
||||
themeData.copyWith(brightness: Brightness.light);
|
||||
}
|
11
packages/flutter/test_fixes/cupertino.dart.expect
Normal file
11
packages/flutter/test_fixes/cupertino.dart.expect
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2014 The Flutter Authors. 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/cupertino.dart';
|
||||
|
||||
void main() {
|
||||
// Change made in https://github.com/flutter/flutter/pull/41859
|
||||
const CupertinoTextThemeData themeData = CupertinoTextThemeData();
|
||||
themeData.copyWith();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user