Updated references to the old button classes to the new ones in comments and documentation for classes in the widgets, services and rendering libraries. (#62099)

This commit is contained in:
Darren Austin 2020-07-28 10:46:10 -07:00 committed by GitHub
parent 6d07b1b475
commit c14e328c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 23 additions and 25 deletions

View File

@ -2980,7 +2980,7 @@ class RenderRepaintBoundary extends RenderProxyBox {
/// return RepaintBoundary( /// return RepaintBoundary(
/// key: globalKey, /// key: globalKey,
/// child: Center( /// child: Center(
/// child: FlatButton( /// child: TextButton(
/// child: Text('Hello World', textDirection: TextDirection.ltr), /// child: Text('Hello World', textDirection: TextDirection.ltr),
/// onPressed: _capturePng, /// onPressed: _capturePng,
/// ), /// ),

View File

@ -375,7 +375,7 @@ class SystemChrome {
/// return AnnotatedRegion( /// return AnnotatedRegion(
/// value: _currentStyle, /// value: _currentStyle,
/// child: Center( /// child: Center(
/// child: RaisedButton( /// child: ElevatedButton(
/// child: const Text('Change Color'), /// child: const Text('Change Color'),
/// onPressed: _changeColor, /// onPressed: _changeColor,
/// ), /// ),

View File

@ -863,7 +863,7 @@ class _ActionsMarker extends InheritedWidget {
/// children: <Widget>[ /// children: <Widget>[
/// Padding( /// Padding(
/// padding: const EdgeInsets.all(8.0), /// padding: const EdgeInsets.all(8.0),
/// child: FlatButton(onPressed: () {}, child: Text('Press Me')), /// child: TextButton(onPressed: () {}, child: Text('Press Me')),
/// ), /// ),
/// Padding( /// Padding(
/// padding: const EdgeInsets.all(8.0), /// padding: const EdgeInsets.all(8.0),

View File

@ -120,7 +120,7 @@ typedef AnimatedSwitcherLayoutBuilder = Widget Function(Widget currentChild, Lis
/// style: Theme.of(context).textTheme.headline4, /// style: Theme.of(context).textTheme.headline4,
/// ), /// ),
/// ), /// ),
/// RaisedButton( /// ElevatedButton(
/// child: const Text('Increment'), /// child: const Text('Increment'),
/// onPressed: () { /// onPressed: () {
/// setState(() { /// setState(() {

View File

@ -6204,7 +6204,7 @@ class MouseRegion extends StatefulWidget {
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
/// return Column( /// return Column(
/// children: <Widget>[ /// children: <Widget>[
/// RaisedButton( /// ElevatedButton(
/// onPressed: () { /// onPressed: () {
/// setState(() { key = UniqueKey(); }); /// setState(() { key = UniqueKey(); });
/// }, /// },

View File

@ -926,7 +926,7 @@ class EditableText extends StatefulWidget {
/// title: const Text('Thats correct!'), /// title: const Text('Thats correct!'),
/// content: Text ('13 is the right answer.'), /// content: Text ('13 is the right answer.'),
/// actions: <Widget>[ /// actions: <Widget>[
/// FlatButton( /// TextButton(
/// onPressed: () { Navigator.pop(context); }, /// onPressed: () { Navigator.pop(context); },
/// child: const Text('OK'), /// child: const Text('OK'),
/// ), /// ),

View File

@ -823,7 +823,7 @@ class FocusNode with DiagnosticableTreeMixin, ChangeNotifier {
/// ], /// ],
/// ); /// );
/// }), /// }),
/// OutlineButton( /// OutlinedButton(
/// child: const Text('UNFOCUS'), /// child: const Text('UNFOCUS'),
/// onPressed: () { /// onPressed: () {
/// setState(() { /// setState(() {

View File

@ -801,7 +801,7 @@ class _FocusState extends State<Focus> {
/// children: <Widget>[ /// children: <Widget>[
/// // This button would be not visible, but still focusable from /// // This button would be not visible, but still focusable from
/// // the foreground pane without the FocusScope. /// // the foreground pane without the FocusScope.
/// RaisedButton( /// ElevatedButton(
/// onPressed: () => print('You pressed the other button!'), /// onPressed: () => print('You pressed the other button!'),
/// child: Text('ANOTHER BUTTON TO FOCUS'), /// child: Text('ANOTHER BUTTON TO FOCUS'),
/// ), /// ),

View File

@ -20,7 +20,7 @@ import 'will_pop_scope.dart';
/// ///
/// {@tool dartpad --template=stateful_widget_scaffold} /// {@tool dartpad --template=stateful_widget_scaffold}
/// This example shows a [Form] with one [TextFormField] to enter an email /// This example shows a [Form] with one [TextFormField] to enter an email
/// address and a [RaisedButton] to submit the form. A [GlobalKey] is used here /// address and an [ElevatedButton] to submit the form. A [GlobalKey] is used here
/// to identify the [Form] and validate input. /// to identify the [Form] and validate input.
/// ///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/widgets/form.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/widgets/form.png)
@ -48,7 +48,7 @@ import 'will_pop_scope.dart';
/// ), /// ),
/// Padding( /// Padding(
/// padding: const EdgeInsets.symmetric(vertical: 16.0), /// padding: const EdgeInsets.symmetric(vertical: 16.0),
/// child: RaisedButton( /// child: ElevatedButton(
/// onPressed: () { /// onPressed: () {
/// // Validate will return true if the form is valid, or false if /// // Validate will return true if the form is valid, or false if
/// // the form is invalid. /// // the form is invalid.

View File

@ -2041,7 +2041,7 @@ typedef ElementVisitor = void Function(Element element);
/// appBar: AppBar(title: Text('Demo')), /// appBar: AppBar(title: Text('Demo')),
/// body: Builder( /// body: Builder(
/// builder: (BuildContext context) { /// builder: (BuildContext context) {
/// return FlatButton( /// return TextButton(
/// child: Text('BUTTON'), /// child: Text('BUTTON'),
/// onPressed: () { /// onPressed: () {
/// // here, Scaffold.of(context) returns the locally created Scaffold /// // here, Scaffold.of(context) returns the locally created Scaffold

View File

@ -1305,7 +1305,7 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat
/// duration: Duration(seconds: 3), /// duration: Duration(seconds: 3),
/// child: FlutterLogo(), /// child: FlutterLogo(),
/// ), /// ),
/// RaisedButton( /// ElevatedButton(
/// child: Text('Fade Logo'), /// child: Text('Fade Logo'),
/// onPressed: _changeOpacity, /// onPressed: _changeOpacity,
/// ), /// ),

View File

@ -1085,7 +1085,7 @@ class DefaultTransitionDelegate<T> extends TransitionDelegate<T> {
/// return Scaffold( /// return Scaffold(
/// appBar: AppBar(title: Text('My Page')), /// appBar: AppBar(title: Text('My Page')),
/// body: Center( /// body: Center(
/// child: FlatButton( /// child: TextButton(
/// child: Text('POP'), /// child: Text('POP'),
/// onPressed: () { /// onPressed: () {
/// Navigator.pop(context); /// Navigator.pop(context);

View File

@ -44,7 +44,7 @@ import 'viewport.dart';
/// {@tool snippet} /// {@tool snippet}
/// ///
/// This widget introduces a [MaterialApp], [Scaffold] and [PageView] with two pages /// This widget introduces a [MaterialApp], [Scaffold] and [PageView] with two pages
/// using the default constructor. Both pages contain a [RaisedButton] allowing you /// using the default constructor. Both pages contain an [ElevatedButton] allowing you
/// to animate the [PageView] using a [PageController]. /// to animate the [PageView] using a [PageController].
/// ///
/// ```dart /// ```dart
@ -79,8 +79,7 @@ import 'viewport.dart';
/// Container( /// Container(
/// color: Colors.red, /// color: Colors.red,
/// child: Center( /// child: Center(
/// child: RaisedButton( /// child: ElevatedButton(
/// color: Colors.white,
/// onPressed: () { /// onPressed: () {
/// if (_pageController.hasClients) { /// if (_pageController.hasClients) {
/// _pageController.animateToPage( /// _pageController.animateToPage(
@ -97,8 +96,7 @@ import 'viewport.dart';
/// Container( /// Container(
/// color: Colors.blue, /// color: Colors.blue,
/// child: Center( /// child: Center(
/// child: RaisedButton( /// child: ElevatedButton(
/// color: Colors.white,
/// onPressed: () { /// onPressed: () {
/// if (_pageController.hasClients) { /// if (_pageController.hasClients) {
/// _pageController.animateToPage( /// _pageController.animateToPage(
@ -660,7 +658,7 @@ class PageView extends StatefulWidget {
/// child: Row( /// child: Row(
/// mainAxisAlignment: MainAxisAlignment.center, /// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[ /// children: <Widget>[
/// FlatButton( /// TextButton(
/// onPressed: () => _reverse(), /// onPressed: () => _reverse(),
/// child: Text('Reverse items'), /// child: Text('Reverse items'),
/// ), /// ),

View File

@ -523,7 +523,7 @@ mixin LocalHistoryRoute<T> on Route<T> {
/// children: <Widget>[ /// children: <Widget>[
/// Text('HomePage'), /// Text('HomePage'),
/// // Press this button to open the SecondPage. /// // Press this button to open the SecondPage.
/// RaisedButton( /// ElevatedButton(
/// child: Text('Second Page >'), /// child: Text('Second Page >'),
/// onPressed: () { /// onPressed: () {
/// Navigator.pushNamed(context, '/second_page'); /// Navigator.pushNamed(context, '/second_page');
@ -568,7 +568,7 @@ mixin LocalHistoryRoute<T> on Route<T> {
/// height: 100.0, /// height: 100.0,
/// color: Colors.red, /// color: Colors.red,
/// ) /// )
/// : RaisedButton( /// : ElevatedButton(
/// child: Text('Show Rectangle'), /// child: Text('Show Rectangle'),
/// onPressed: _navigateLocallyToShowRectangle, /// onPressed: _navigateLocallyToShowRectangle,
/// ); /// );
@ -579,7 +579,7 @@ mixin LocalHistoryRoute<T> on Route<T> {
/// mainAxisAlignment: MainAxisAlignment.center, /// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[ /// children: <Widget>[
/// localNavContent, /// localNavContent,
/// RaisedButton( /// ElevatedButton(
/// child: Text('< Back'), /// child: Text('< Back'),
/// onPressed: () { /// onPressed: () {
/// // Pop a route. If this is pressed while the red rectangle is /// // Pop a route. If this is pressed while the red rectangle is

View File

@ -1278,7 +1278,7 @@ class ListView extends BoxScrollView {
/// child: Row( /// child: Row(
/// mainAxisAlignment: MainAxisAlignment.center, /// mainAxisAlignment: MainAxisAlignment.center,
/// children: <Widget>[ /// children: <Widget>[
/// FlatButton( /// TextButton(
/// onPressed: () => _reverse(), /// onPressed: () => _reverse(),
/// child: Text('Reverse items'), /// child: Text('Reverse items'),
/// ), /// ),

View File

@ -373,7 +373,7 @@ class _RenderSliverFractionalPadding extends RenderSliverEdgeInsetsPadding {
/// alignment: Alignment.bottomCenter, /// alignment: Alignment.bottomCenter,
/// child: Padding( /// child: Padding(
/// padding: const EdgeInsets.all(16.0), /// padding: const EdgeInsets.all(16.0),
/// child: RaisedButton( /// child: ElevatedButton(
/// onPressed: () { /// onPressed: () {
/// /* Place your onPressed code here! */ /// /* Place your onPressed code here! */
/// }, /// },

View File

@ -322,7 +322,7 @@ class DefaultTextHeightBehavior extends InheritedTheme {
/// To make [Text] react to touch events, wrap it in a [GestureDetector] widget /// To make [Text] react to touch events, wrap it in a [GestureDetector] widget
/// with a [GestureDetector.onTap] handler. /// with a [GestureDetector.onTap] handler.
/// ///
/// In a material design application, consider using a [FlatButton] instead, or /// In a material design application, consider using a [TextButton] instead, or
/// if that isn't appropriate, at least using an [InkWell] instead of /// if that isn't appropriate, at least using an [InkWell] instead of
/// [GestureDetector]. /// [GestureDetector].
/// ///