Unverified Commit e9a8315f authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Remove deprecated CupertinoTextThemeData.brightness (#72017)

parent 1129e6f8
...@@ -42,6 +42,7 @@ analyzer: ...@@ -42,6 +42,7 @@ analyzer:
# see https://github.com/dart-lang/sdk/issues/28463 # see https://github.com/dart-lang/sdk/issues/28463
- "lib/i18n/messages_*.dart" - "lib/i18n/messages_*.dart"
- "lib/src/http/**" - "lib/src/http/**"
- "test_fixes/**"
linter: linter:
rules: rules:
......
...@@ -644,6 +644,18 @@ Future<void> _runFrameworkTests() async { ...@@ -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 { Future<void> runPrivateTests() async {
final List<String> args = <String>[ final List<String> args = <String>[
'run', 'run',
...@@ -702,6 +714,7 @@ Future<void> _runFrameworkTests() async { ...@@ -702,6 +714,7 @@ Future<void> _runFrameworkTests() async {
options: <String>['--enable-vmservice'], options: <String>['--enable-vmservice'],
tableData: bigqueryApi?.tabledata, tableData: bigqueryApi?.tabledata,
); );
await runFixTests();
await runPrivateTests(); await runPrivateTests();
const String httpClientWarning = const String httpClientWarning =
'Warning: At least one test in this suite creates an HttpClient. When\n' 'Warning: At least one test in this suite creates an HttpClient. When\n'
......
# 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 { ...@@ -124,12 +124,6 @@ class CupertinoTextThemeData with Diagnosticable {
/// unspecified. /// unspecified.
const CupertinoTextThemeData({ const CupertinoTextThemeData({
Color primaryColor = CupertinoColors.systemBlue, 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? textStyle,
TextStyle? actionTextStyle, TextStyle? actionTextStyle,
TextStyle? tabLabelTextStyle, TextStyle? tabLabelTextStyle,
...@@ -230,11 +224,6 @@ class CupertinoTextThemeData with Diagnosticable { ...@@ -230,11 +224,6 @@ class CupertinoTextThemeData with Diagnosticable {
/// specified overrides. /// specified overrides.
CupertinoTextThemeData copyWith({ CupertinoTextThemeData copyWith({
Color? primaryColor, 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? textStyle,
TextStyle? actionTextStyle, TextStyle? actionTextStyle,
TextStyle? tabLabelTextStyle, TextStyle? tabLabelTextStyle,
......
# This ensures that parent analysis options do not accidentally break the fix tests.
// 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);
}
// 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();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment