Clarify ButtonThemeData usage and documentation #98691
Labels
a: annoyance
Repeatedly frustrating issues with non-experimental functionality
a: quality
A truly polished experience
d: api docs
Issues with https://api.flutter.dev/
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
P2
Important issues not at the top of the work list
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
Feedback from @rydmike in #98537 (comment)
ButtonThemeData
The
ButtonThemeData
class is marked as obsolete in the docs, but not as deprecated.In its theme
ButtonTheme
:flutter/packages/flutter/lib/src/material/button_theme.dart
Line 53 in adafd66
And in its theme data
ButtonThemeData
:flutter/packages/flutter/lib/src/material/button_theme.dart
Line 170 in adafd66
In addition to the buttons that will be removed [FlatButton, OutlineButton, RaisedButton], the theme and theme data is used by the buttons' parent class
MaterialButton
and theButtonBar
and its themeButtonBarTheme
, plus as far I could noticeDropdownButton
uses one property from it as well.Instead of having the docs above mention that it is used by buttons that will no longer exist, maybe consider updating the doc comment and instead mention the usage by
ButtonBar
,DropdownButton
andMaterialButton
, if it will remain. It kind of will have to, but more on that below.Perhaps for the update also consider updating the doc comment for the
buttonTheme
property inThemeData
to better reflects its remaining usage inButtonBar
,DropdownButton
andMaterialButton
Some of these doc updates will be completed in the course of resolving #98537
flutter/packages/flutter/lib/src/material/theme_data.dart
Line 1322 in adafd66
In general, I think the current use case is unclear to users,
obsolete
is not deprecated, but it's not reallyobsolete
either if other parts of the framework still use ButtonThemeData. There is definitely some opportunity for better clarity and guidance here - even if that is just to say we plan to make more changes in the future that will eventually remove this class.cc @HansMuller @darrenaustin
The text was updated successfully, but these errors were encountered: