@@ -11,7 +11,6 @@ import 'constants.dart';
1111import 'flat_button.dart' ;
1212import 'material_button.dart' ;
1313import 'material_state.dart' ;
14- import 'raised_button.dart' ;
1514import 'theme.dart' ;
1615import 'theme_data.dart' show MaterialTapTargetSize;
1716
@@ -21,8 +20,7 @@ import 'theme_data.dart' show MaterialTapTargetSize;
2120///
2221/// See also:
2322///
24- /// * [RaisedButton] and [FlatButton] which are configured
25- /// based on the ambient [ButtonTheme].
23+ /// * [FlatButton] which is configured based on the ambient [ButtonTheme] .
2624enum ButtonTextTheme {
2725 /// Button text is black or white depending on [ThemeData.brightness] .
2826 normal,
@@ -68,8 +66,7 @@ enum ButtonBarLayoutBehavior {
6866///
6967/// See also:
7068///
71- /// * [FlatButton] and [RaisedButton] which are styled
72- /// based on the ambient button theme.
69+ /// * [FlatButton] which is styled based on the ambient button theme.
7370/// * [RawMaterialButton] , which can be used to configure a button that doesn't
7471/// depend on any inherited themes.
7572class ButtonTheme extends InheritedTheme {
@@ -174,11 +171,9 @@ class ButtonTheme extends InheritedTheme {
174171/// * [ElevatedButton] , [ElevatedButtonTheme] , [ElevatedButtonThemeData] ,
175172/// * [OutlinedButton] , [OutlinedButtonTheme] , [OutlinedButtonThemeData]
176173///
177- /// FlatButton and RaisedButton have been replaced by
178- /// TextButton and ElevatedButton respectively.
179- /// ButtonTheme has been replaced by TextButtonTheme and
180- /// ElevatedButtonTheme. The original classes
181- /// have been deprecated, please migrate code that uses them.
174+ /// FlatButton has been replaced by TextButton and ButtonTheme has been replaced
175+ /// by TextButtonTheme. Please migrate code that uses them.
176+ ///
182177/// There's a detailed migration guide for the new button and button
183178/// theme classes in
184179/// [flutter.dev/go/material-button-migration-guide] (https://flutter.dev/go/material-button-migration-guide).
@@ -196,8 +191,8 @@ class ButtonThemeData with Diagnosticable {
196191 /// [height] parameters must greater than or equal to zero.
197192 ///
198193 /// The ButtonTheme's methods that have a [MaterialButton] parameter and
199- /// have a name with a `get` prefix are used by [RaisedButton]
200- /// and [FlatButton] to configure a [RawMaterialButton] .
194+ /// have a name with a `get` prefix are used by [FlatButton] to configure a
195+ /// [RawMaterialButton] .
201196 const ButtonThemeData ({
202197 this .textTheme = ButtonTextTheme .normal,
203198 this .minWidth = 88.0 ,
@@ -278,7 +273,7 @@ class ButtonThemeData with Diagnosticable {
278273 ///
279274 /// See also:
280275 ///
281- /// * [getPadding] , which is used by [RaisedButton] and [ FlatButton] .
276+ /// * [getPadding] , which is used by [FlatButton] .
282277 EdgeInsetsGeometry get padding {
283278 if (_padding != null )
284279 return _padding! ;
@@ -304,7 +299,7 @@ class ButtonThemeData with Diagnosticable {
304299 ///
305300 /// See also:
306301 ///
307- /// * [getShape] , which is used by [RaisedButton] and [ FlatButton] .
302+ /// * [getShape] , which is used by [FlatButton] .
308303 ShapeBorder get shape {
309304 if (_shape != null )
310305 return _shape! ;
@@ -333,7 +328,7 @@ class ButtonThemeData with Diagnosticable {
333328 /// This property only affects [DropdownButton] and its menu.
334329 final bool alignedDropdown;
335330
336- /// The background fill color for [RaisedButton] s .
331+ /// The background fill color.
337332 ///
338333 /// This property is null by default.
339334 ///
@@ -343,18 +338,17 @@ class ButtonThemeData with Diagnosticable {
343338 ///
344339 /// See also:
345340 ///
346- /// * [getFillColor] , which is used by [RaisedButton] to compute its
347- /// background fill color.
341+ /// * [getFillColor] , which is used to compute the background fill color.
348342 final Color ? _buttonColor;
349343
350- /// The background fill color for disabled [RaisedButton] s .
344+ /// The background fill color when disabled.
351345 ///
352346 /// This property is null by default.
353347 ///
354348 /// See also:
355349 ///
356- /// * [getDisabledFillColor] , which is used by [RaisedButton] to compute its
357- /// background fill color .
350+ /// * [getDisabledFillColor] , which is to compute background fill color for
351+ /// disabled state .
358352 final Color ? _disabledColor;
359353
360354 /// The fill color of the button when it has the input focus.
@@ -366,7 +360,7 @@ class ButtonThemeData with Diagnosticable {
366360 ///
367361 /// See also:
368362 ///
369- /// * [getFocusColor] , which is used by [RaisedButton] and [ FlatButton] .
363+ /// * [getFocusColor] , which is used by [FlatButton] .
370364 final Color ? _focusColor;
371365
372366 /// The fill color of the button when a pointer is hovering over it.
@@ -378,7 +372,7 @@ class ButtonThemeData with Diagnosticable {
378372 ///
379373 /// See also:
380374 ///
381- /// * [getHoverColor] , which is used by [RaisedButton] and [ FlatButton] .
375+ /// * [getHoverColor] , which is used by [FlatButton] .
382376 final Color ? _hoverColor;
383377
384378 /// The color of the overlay that appears when a button is pressed.
@@ -387,7 +381,7 @@ class ButtonThemeData with Diagnosticable {
387381 ///
388382 /// See also:
389383 ///
390- /// * [getHighlightColor] , which is used by [RaisedButton] and [ FlatButton] .
384+ /// * [getHighlightColor] , which is used by [FlatButton] .
391385 final Color ? _highlightColor;
392386
393387 /// The color of the ink "splash" overlay that appears when a button is tapped.
@@ -396,7 +390,7 @@ class ButtonThemeData with Diagnosticable {
396390 ///
397391 /// See also:
398392 ///
399- /// * [getSplashColor] , which is used by [RaisedButton] and [ FlatButton] .
393+ /// * [getSplashColor] , which is used by [FlatButton] .
400394 final Color ? _splashColor;
401395
402396 /// A set of thirteen colors that can be used to derive the button theme's
@@ -417,7 +411,7 @@ class ButtonThemeData with Diagnosticable {
417411 //
418412 // See also:
419413 //
420- // * [getMaterialTargetTapSize], which is used by [RaisedButton] and [ FlatButton].
414+ // * [getMaterialTargetTapSize], which is used by [FlatButton].
421415 final MaterialTapTargetSize ? _materialTapTargetSize;
422416
423417 /// The [button] 's overall brightness.
@@ -484,9 +478,6 @@ class ButtonThemeData with Diagnosticable {
484478 /// Otherwise, if button is a [FlatButton] then null is
485479 /// returned.
486480 ///
487- /// Otherwise, if button is a [RaisedButton] , returns the `buttonColor`
488- /// constructor parameter if it was non-null and the button is enabled.
489- ///
490481 /// Otherwise the fill color depends on the value of [getTextTheme] .
491482 ///
492483 /// * [ButtonTextTheme.normal] or [ButtonTextTheme.accent] , the
@@ -505,7 +496,7 @@ class ButtonThemeData with Diagnosticable {
505496 if (button is FlatButton || button.runtimeType == MaterialButton )
506497 return null ;
507498
508- if (button.enabled && button is RaisedButton && _buttonColor != null )
499+ if (button.enabled && _buttonColor != null )
509500 return _buttonColor;
510501
511502 switch (getTextTheme (button)) {
@@ -569,7 +560,7 @@ class ButtonThemeData with Diagnosticable {
569560 /// Returns the button's [MaterialButton.splashColor] if it is non-null.
570561 ///
571562 /// Otherwise, returns the value of the `splashColor` constructor parameter
572- /// it is non-null and [button] is a [RaisedButton] .
563+ /// it is non-null.
573564 ///
574565 /// Otherwise, returns the value of the `splashColor` constructor parameter
575566 /// if it is non-null and [button] is a [FlatButton] and
@@ -580,7 +571,7 @@ class ButtonThemeData with Diagnosticable {
580571 if (button.splashColor != null )
581572 return button.splashColor! ;
582573
583- if (_splashColor != null && button is RaisedButton )
574+ if (_splashColor != null )
584575 return _splashColor! ;
585576
586577 if (_splashColor != null && button is FlatButton ) {
@@ -715,8 +706,8 @@ class ButtonThemeData with Diagnosticable {
715706 ///
716707 /// Returns the button's [MaterialButton.padding] if it is non-null.
717708 ///
718- /// If this is a button constructed with [RaisedButton .icon] or
719- /// [FlatButton.icon] then the padding is:
709+ /// If this is a button constructed with [FlatButton .icon] then the padding
710+ /// is:
720711 /// `EdgeInsetsDirectional.only(start: 12.0, end: 16.0)` .
721712 ///
722713 /// Otherwise, returns [padding] if it is non-null.
0 commit comments