Open bwilkerson opened 4 years ago
Parameters of constructors that have been marked with the deprecated annotation are displayed as such in the documentation for the class, but deprecated parameters of methods are not.
deprecated
For an example, see https://api.flutter.dev/flutter/cupertino/CupertinoTextThemeData-class.html. The constructor is documented as
CupertinoTextThemeData({Color primaryColor: CupertinoColors.systemBlue, @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, TextStyle navTitleTextStyle, TextStyle navLargeTitleTextStyle, TextStyle navActionTextStyle, TextStyle pickerTextStyle, TextStyle dateTimePickerTextStyle})
But lower down on the same page is a method named copyWith that is documented as
copyWith
copyWith({Color primaryColor, Brightness brightness, TextStyle textStyle, TextStyle actionTextStyle, TextStyle tabLabelTextStyle, TextStyle navTitleTextStyle, TextStyle navLargeTitleTextStyle, TextStyle navActionTextStyle, TextStyle pickerTextStyle, TextStyle dateTimePickerTextStyle}) → CupertinoTextThemeData
If you click through to the method's page (https://api.flutter.dev/flutter/cupertino/CupertinoTextThemeData/copyWith.html), you'll see that the brightness parameter is also deprecated:
brightness
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, TextStyle navTitleTextStyle, TextStyle navLargeTitleTextStyle, TextStyle navActionTextStyle, TextStyle pickerTextStyle, TextStyle dateTimePickerTextStyle} )
Yes, this is not good, we should be able to indicate deprecation status in the class's view of copyWith.
Parameters of constructors that have been marked with the
deprecated
annotation are displayed as such in the documentation for the class, but deprecated parameters of methods are not.For an example, see https://api.flutter.dev/flutter/cupertino/CupertinoTextThemeData-class.html. The constructor is documented as
But lower down on the same page is a method named
copyWith
that is documented asIf you click through to the method's page (https://api.flutter.dev/flutter/cupertino/CupertinoTextThemeData/copyWith.html), you'll see that the
brightness
parameter is also deprecated: