diff --git a/packages/flutter/test/painting/system_fonts_test.dart b/packages/flutter/test/painting/system_fonts_test.dart index 222e5705d9..fd48e6b2c0 100644 --- a/packages/flutter/test/painting/system_fonts_test.dart +++ b/packages/flutter/test/painting/system_fonts_test.dart @@ -208,7 +208,7 @@ void main() { child: Center( child: Builder( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( child: const Text('X'), onPressed: () { showTimePicker( diff --git a/packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart b/packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart index edc25d15c9..dd6314efac 100644 --- a/packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart +++ b/packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart @@ -23,7 +23,7 @@ void main() { textDirection: TextDirection.ltr, child: Stack( children: [ - FlatButton( + TextButton( child: const Text('TapHere'), onPressed: onButtonPressed, ), diff --git a/packages/flutter/test/widgets/drawer_test.dart b/packages/flutter/test/widgets/drawer_test.dart index 6ad9a774c5..d4aff7c828 100644 --- a/packages/flutter/test/widgets/drawer_test.dart +++ b/packages/flutter/test/widgets/drawer_test.dart @@ -270,7 +270,7 @@ void main() { child: ListView( children: [ const Text('drawer'), - FlatButton( + TextButton( child: const Text('close'), onPressed: () => Navigator.pop(context), ), @@ -278,7 +278,7 @@ void main() { ), ), body: Container( - child: FlatButton( + child: TextButton( child: const Text('button'), onPressed: () { buttonPressed = true; }, ), diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index 12b8ac8833..2f647983d4 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart @@ -5344,7 +5344,7 @@ class _TransformedEditableTextState extends State { backgroundCursorColor: Colors.grey, ), ), - RaisedButton( + ElevatedButton( key: widget.transformButtonKey, onPressed: () { setState(() { diff --git a/packages/flutter/test/widgets/heroes_test.dart b/packages/flutter/test/widgets/heroes_test.dart index 9f11a25576..23d56b8437 100644 --- a/packages/flutter/test/widgets/heroes_test.dart +++ b/packages/flutter/test/widgets/heroes_test.dart @@ -49,15 +49,15 @@ final Map routes = { child: Container(height: 100.0, width: 100.0, key: firstKey), )), const SizedBox(height: 100.0, width: 100.0), - FlatButton( + TextButton( child: const Text('two'), onPressed: () { Navigator.pushNamed(context, '/two'); }, ), - FlatButton( + TextButton( child: const Text('twoInset'), onPressed: () { Navigator.pushNamed(context, '/twoInset'); }, ), - FlatButton( + TextButton( child: const Text('simple'), onPressed: () { Navigator.pushNamed(context, '/simple'); }, ), @@ -68,7 +68,7 @@ final Map routes = { child: ListView( key: routeTwoKey, children: [ - FlatButton( + TextButton( child: const Text('pop'), onPressed: () { Navigator.pop(context); }, ), @@ -79,7 +79,7 @@ final Map routes = { child: Container(height: 150.0, width: 150.0, key: secondKey), )), const SizedBox(height: 150.0, width: 150.0), - FlatButton( + TextButton( child: const Text('three'), onPressed: () { Navigator.push(context, ThreeRoute()); }, ), @@ -94,7 +94,7 @@ final Map routes = { child: ListView( key: routeTwoKey, children: [ - FlatButton( + TextButton( child: const Text('pop'), onPressed: () { Navigator.pop(context); }, ), @@ -110,7 +110,7 @@ final Map routes = { ), ), const SizedBox(height: 150.0, width: 150.0), - FlatButton( + TextButton( child: const Text('three'), onPressed: () { Navigator.push(context, ThreeRoute()); }, ), @@ -433,7 +433,7 @@ Future main() async { children: [ const Hero(tag: 'a', child: Text('foo')), Builder(builder: (BuildContext context) { - return FlatButton(child: const Text('two'), onPressed: () => Navigator.push(context, route)); + return TextButton(child: const Text('two'), onPressed: () => Navigator.push(context, route)); }), ], ), @@ -618,7 +618,7 @@ Future main() async { const Hero(tag: 'a', child: Text('a too')), Builder( builder: (BuildContext context) { - return FlatButton( + return TextButton( child: const Text('push'), onPressed: () { Navigator.push(context, PageRouteBuilder( @@ -821,7 +821,7 @@ Future main() async { ); }, ), - FlatButton( + TextButton( child: const Text('POP'), onPressed: () { Navigator.pop(context); }, ), @@ -842,7 +842,7 @@ Future main() async { Card( child: Hero(tag: 'H', child: Container(key: homeHeroKey, height: 100.0, width: 100.0)), ), - FlatButton( + TextButton( child: const Text('PUSH'), onPressed: () { Navigator.push(context, route); }, ), @@ -919,7 +919,7 @@ Future main() async { key: routeContainerKey, child: Hero(tag: 'H', child: Container(key: routeHeroKey, height: 200.0, width: 200.0)), ), - FlatButton( + TextButton( child: const Text('POP'), onPressed: () { Navigator.pop(context); }, ), @@ -950,7 +950,7 @@ Future main() async { Container( child: Hero(tag: 'H', child: Container(key: homeHeroKey, height: 100.0, width: 100.0)), ), - FlatButton( + TextButton( child: const Text('PUSH'), onPressed: () { Navigator.push(context, route); }, ), @@ -1029,7 +1029,7 @@ Future main() async { Container( child: Hero(tag: 'H', child: Container(key: homeHeroKey, height: 100.0, width: 100.0)), ), - FlatButton( + TextButton( child: const Text('PUSH'), onPressed: () { Navigator.push(context, route); }, ), @@ -1117,7 +1117,7 @@ Future main() async { ), ), ), - FlatButton( + TextButton( child: const Text('PUSH C'), onPressed: () { Navigator.push(context, routeC); }, ), @@ -1157,7 +1157,7 @@ Future main() async { ), ), ), - FlatButton( + TextButton( child: const Text('PUSH B'), onPressed: () { Navigator.push(context, routeB); }, ), @@ -1230,7 +1230,7 @@ Future main() async { ), ), ), - FlatButton( + TextButton( child: const Text('POP'), onPressed: () { Navigator.pop(context); }, ), @@ -1256,7 +1256,7 @@ Future main() async { ), ), ), - FlatButton( + TextButton( child: const Text('PUSH'), onPressed: () { Navigator.push(context, route); }, ), @@ -1314,7 +1314,7 @@ Future main() async { createRectTween: createRectTween, child: Container(height: 100.0, width: 100.0, key: firstKey), ), - FlatButton( + TextButton( child: const Text('two'), onPressed: () { Navigator.pushNamed(context, '/two'); }, ), @@ -1327,7 +1327,7 @@ Future main() async { children: [ SizedBox( height: 200.0, - child: FlatButton( + child: TextButton( child: const Text('pop'), onPressed: () { Navigator.pop(context); }, ), @@ -1429,7 +1429,7 @@ Future main() async { createRectTween: createRectTween, child: Container(height: 100.0, width: 100.0, key: firstKey), ), - FlatButton( + TextButton( child: const Text('two'), onPressed: () { Navigator.pushNamed(context, '/two'); }, ), @@ -1442,7 +1442,7 @@ Future main() async { children: [ SizedBox( height: 200.0, - child: FlatButton( + child: TextButton( child: const Text('pop'), onPressed: () { Navigator.pop(context); }, ), @@ -1634,7 +1634,7 @@ Future main() async { children: [ const Hero(tag: 'a', child: Text('foo')), Builder(builder: (BuildContext context) { - return FlatButton( + return TextButton( child: const Text('two'), onPressed: () => Navigator.push(context, MaterialPageRoute( builder: (BuildContext context) { @@ -1684,7 +1684,7 @@ Future main() async { }, ), Builder(builder: (BuildContext context) { - return FlatButton( + return TextButton( child: const Text('two'), onPressed: () => Navigator.push(context, MaterialPageRoute( builder: (BuildContext context) { diff --git a/packages/flutter/test/widgets/inherited_model_test.dart b/packages/flutter/test/widgets/inherited_model_test.dart index 09ded2da23..03fdebd4b0 100644 --- a/packages/flutter/test/widgets/inherited_model_test.dart +++ b/packages/flutter/test/widgets/inherited_model_test.dart @@ -111,7 +111,7 @@ void main() { showB, showC, showABC, - RaisedButton( + ElevatedButton( child: const Text('Increment a'), onPressed: () { // Rebuilds the ABCModel which triggers a rebuild @@ -120,7 +120,7 @@ void main() { setState(() { _a += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('Increment b'), onPressed: () { // Rebuilds the ABCModel which triggers a rebuild @@ -129,7 +129,7 @@ void main() { setState(() { _b += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('Increment c'), onPressed: () { // Rebuilds the ABCModel which triggers a rebuild @@ -254,19 +254,19 @@ void main() { const SizedBox(height: 24.0), showABC, const SizedBox(height: 24.0), - RaisedButton( + ElevatedButton( child: const Text('Increment a'), onPressed: () { setState(() { _a += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('Increment b'), onPressed: () { setState(() { _b += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('Increment c'), onPressed: () { setState(() { _c += 1; }); @@ -371,25 +371,25 @@ void main() { const SizedBox(height: 24.0), showABC, const SizedBox(height: 24.0), - RaisedButton( + ElevatedButton( child: const Text('Increment a'), onPressed: () { setState(() { _a += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('Increment b'), onPressed: () { setState(() { _b += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('Increment c'), onPressed: () { setState(() { _c += 1; }); }, ), - RaisedButton( + ElevatedButton( child: const Text('rebuild'), onPressed: () { setState(() { diff --git a/packages/flutter/test/widgets/navigator_test.dart b/packages/flutter/test/widgets/navigator_test.dart index f2d950b9c7..4808d1118d 100644 --- a/packages/flutter/test/widgets/navigator_test.dart +++ b/packages/flutter/test/widgets/navigator_test.dart @@ -203,13 +203,13 @@ void main() { if (settings.name == '/') { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( child: const Text('Next'), onPressed: () { Navigator.of(context).push( MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( child: const Text('Inner page'), onPressed: () { Navigator.of(context, rootNavigator: true).push( @@ -1063,19 +1063,19 @@ void main() { await tester.pumpWidget(MaterialApp( navigatorKey: key, navigatorObservers: [observer], - home: FlatButton( + home: TextButton( child: const Text('A'), onPressed: () { key.currentState.push(routeB = MaterialPageRoute( settings: const RouteSettings(name: 'B'), builder: (BuildContext context) { - return FlatButton( + return TextButton( child: const Text('B'), onPressed: () { key.currentState.push(MaterialPageRoute( settings: const RouteSettings(name: 'C'), builder: (BuildContext context) { - return FlatButton( + return TextButton( child: const Text('C'), onPressed: () { key.currentState.replace( @@ -1157,14 +1157,14 @@ void main() { }, ), ), - home: FlatButton( + home: TextButton( child: const Text('A'), onPressed: () { key.currentState.push(routeB = MaterialPageRoute( settings: const RouteSettings(name: 'B'), builder: (BuildContext context) { log.add('building B'); - return FlatButton( + return TextButton( child: const Text('B'), onPressed: () { key.currentState.push(MaterialPageRoute( @@ -1172,7 +1172,7 @@ void main() { builder: (BuildContext context) { log.add('building C'); log.add('found ${ModalRoute.of(context).settings.name}'); - return FlatButton( + return TextButton( child: const Text('C'), onPressed: () { key.currentState.replace( diff --git a/packages/flutter/test/widgets/range_maintaining_scroll_physics_test.dart b/packages/flutter/test/widgets/range_maintaining_scroll_physics_test.dart index c110a9db78..8beabd87f2 100644 --- a/packages/flutter/test/widgets/range_maintaining_scroll_physics_test.dart +++ b/packages/flutter/test/widgets/range_maintaining_scroll_physics_test.dart @@ -40,7 +40,7 @@ class _ExpandingBoxState extends State with AutomaticKeepAliveClie color: Colors.green, child: Align( alignment: Alignment.bottomCenter, - child: FlatButton( + child: TextButton( child: const Text('Collapse'), onPressed: toggleSize, ), @@ -68,7 +68,7 @@ void main() { expect(position.minScrollExtent, 0.0); expect(position.maxScrollExtent, 100.0); expect(position.pixels, 0.0); - await tester.tap(find.byType(FlatButton)); + await tester.tap(find.byType(TextButton)); await tester.pump(); final TestGesture drag1 = await tester.startGesture(const Offset(10.0, 500.0)); @@ -91,7 +91,7 @@ void main() { expect(position.pixels, moreOrLessEquals(900.0)); await tester.pump(); - await tester.tap(find.byType(FlatButton)); + await tester.tap(find.byType(TextButton)); await tester.pump(); expect(position.minScrollExtent, 0.0); expect(position.maxScrollExtent, 100.0); @@ -113,7 +113,7 @@ void main() { expect(position.minScrollExtent, 0.0); expect(position.maxScrollExtent, 100.0); expect(position.pixels, 0.0); - await tester.tap(find.byType(FlatButton)); + await tester.tap(find.byType(TextButton)); await tester.pump(); // start button animation await tester.pump(const Duration(seconds: 1)); // finish button animation expect(position.minScrollExtent, 0.0); diff --git a/packages/flutter/test/widgets/routes_test.dart b/packages/flutter/test/widgets/routes_test.dart index 53a4787376..9b755674e6 100644 --- a/packages/flutter/test/widgets/routes_test.dart +++ b/packages/flutter/test/widgets/routes_test.dart @@ -1073,7 +1073,7 @@ void main() { await tester.pumpWidget(MaterialApp( home: Builder( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { showGeneralDialog( context: context, @@ -1093,7 +1093,7 @@ void main() { )); // Open the dialog. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); await tester.pump(); expect(find.byType(ModalBarrier), findsNWidgets(2)); @@ -1107,7 +1107,7 @@ void main() { await tester.pumpWidget(MaterialApp( home: Builder( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { showGeneralDialog( context: context, @@ -1125,7 +1125,7 @@ void main() { )); // Open the dialog. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); await tester.pump(); expect(find.byType(ModalBarrier), findsNWidgets(2)); final ModalBarrier barrier = find.byType(ModalBarrier).evaluate().last.widget as ModalBarrier; @@ -1150,7 +1150,7 @@ void main() { onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { showGeneralDialog( context: context, @@ -1170,7 +1170,7 @@ void main() { )); // Open the dialog. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); expect(rootObserver.dialogCount, 1); expect(nestedObserver.dialogCount, 0); @@ -1187,7 +1187,7 @@ void main() { onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { showGeneralDialog( useRootNavigator: false, @@ -1208,7 +1208,7 @@ void main() { )); // Open the dialog. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); expect(rootObserver.dialogCount, 0); expect(nestedObserver.dialogCount, 1); @@ -1223,7 +1223,7 @@ void main() { onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { showGeneralDialog( context: context, @@ -1241,7 +1241,7 @@ void main() { )); // Open the dialog. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); expect(rootObserver.dialogRoutes.length, equals(1)); final ModalRoute route = rootObserver.dialogRoutes.last; expect(route.barrierDismissible, isNotNull); @@ -1257,7 +1257,7 @@ void main() { onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { Navigator.of(context).push( MaterialPageRoute( @@ -1278,7 +1278,7 @@ void main() { )); // Open the new route. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); await tester.pumpAndSettle(); expect(find.text('Open page'), findsNothing); expect(find.byKey(containerKey), findsOneWidget); @@ -1307,7 +1307,7 @@ void main() { onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { Navigator.of(context).push( ModifiedReverseTransitionDurationRoute( @@ -1330,7 +1330,7 @@ void main() { )); // Open the new route. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); await tester.pumpAndSettle(); expect(find.text('Open page'), findsNothing); expect(find.byKey(containerKey), findsOneWidget); @@ -1366,7 +1366,7 @@ void main() { onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute( builder: (BuildContext context) { - return RaisedButton( + return ElevatedButton( onPressed: () { Navigator.of(context).push( ModifiedReverseTransitionDurationRoute( @@ -1389,7 +1389,7 @@ void main() { )); // Open the new route. - await tester.tap(find.byType(RaisedButton)); + await tester.tap(find.byType(ElevatedButton)); await tester.pump(); await tester.pump(const Duration(milliseconds: 200)); // jump partway through the forward transition expect(find.byKey(containerKey), findsOneWidget); @@ -1427,7 +1427,7 @@ void main() { child: Builder( builder: (BuildContext context) { return Center( - child: RaisedButton( + child: ElevatedButton( child: const Text('X'), onPressed: () { Navigator.of(context).push( @@ -1489,7 +1489,7 @@ void main() { child: Builder( builder: (BuildContext context) { return Center( - child: RaisedButton( + child: ElevatedButton( child: const Text('X'), onPressed: () { Navigator.of(context).push( @@ -1554,7 +1554,7 @@ void main() { child: Builder( builder: (BuildContext context) { return Center( - child: RaisedButton( + child: ElevatedButton( child: const Text('X'), onPressed: () { Navigator.of(context).push( diff --git a/packages/flutter/test/widgets/run_app_test.dart b/packages/flutter/test/widgets/run_app_test.dart index 8464197ccb..3c3b95f32c 100644 --- a/packages/flutter/test/widgets/run_app_test.dart +++ b/packages/flutter/test/widgets/run_app_test.dart @@ -13,7 +13,7 @@ void main() { Directionality( textDirection: TextDirection.ltr, child: Material( - child: RaisedButton( + child: ElevatedButton( onPressed: () { runApp(const Center(child: Text('Done', textDirection: TextDirection.ltr,))); }, diff --git a/packages/flutter/test/widgets/semantics_debugger_test.dart b/packages/flutter/test/widgets/semantics_debugger_test.dart index fb86995e06..4817733f50 100644 --- a/packages/flutter/test/widgets/semantics_debugger_test.dart +++ b/packages/flutter/test/widgets/semantics_debugger_test.dart @@ -161,13 +161,13 @@ void main() { child: Material( child: ListView( children: [ - RaisedButton( + ElevatedButton( onPressed: () { log.add('top'); }, child: const Text('TOP'), ), - RaisedButton( + ElevatedButton( onPressed: () { log.add('bottom'); }, @@ -199,14 +199,14 @@ void main() { child: Material( child: ListView( children: [ - RaisedButton( + ElevatedButton( onPressed: () { log.add('top'); }, child: const Text('TOP', textDirection: TextDirection.ltr), ), ExcludeSemantics( - child: RaisedButton( + child: ElevatedButton( onPressed: () { log.add('bottom'); }, diff --git a/packages/flutter/test/widgets/sliver_fill_remaining_test.dart b/packages/flutter/test/widgets/sliver_fill_remaining_test.dart index 2c4b0394ef..3a78720008 100644 --- a/packages/flutter/test/widgets/sliver_fill_remaining_test.dart +++ b/packages/flutter/test/widgets/sliver_fill_remaining_test.dart @@ -188,7 +188,7 @@ void main() { color: Colors.blue, child: Align( alignment: Alignment.bottomCenter, - child: RaisedButton( + child: ElevatedButton( child: const Text('bottomCenter button'), onPressed: () {}, ), @@ -203,7 +203,7 @@ void main() { ); // Also check that the button alignment is true to expectations - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect(tester.getBottomLeft(button).dy, equals(600.0)); expect(tester.getCenter(button).dx, equals(400.0)); @@ -261,7 +261,7 @@ void main() { alignment: Alignment.center, child: Padding( padding: const EdgeInsets.all(50.0), - child: RaisedButton( + child: ElevatedButton( child: const Text('center button'), onPressed: () {}, ), @@ -279,7 +279,7 @@ void main() { ); // Also check that the button alignment is true to expectations - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect(tester.getBottomLeft(button).dy, equals(550.0)); expect(tester.getCenter(button).dx, equals(400.0)); }); @@ -298,7 +298,7 @@ void main() { child: Center(child: FlutterLogo(size: 100)), fit: FlexFit.loose, ), - RaisedButton( + ElevatedButton( child: const Text('Bottom'), onPressed: () {}, ), @@ -322,7 +322,7 @@ void main() { expect(tester.getCenter(logo), const Offset(400.0, 351.0)); // Also check that the button alignment is true to expectations - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect( tester.renderObject(button).size, const Size(116.0, 48.0), @@ -390,7 +390,7 @@ void main() { color: Colors.blue, child: Align( alignment: Alignment.bottomCenter, - child: RaisedButton( + child: ElevatedButton( child: const Text('bottomCenter button'), onPressed: () {}, ), @@ -413,7 +413,7 @@ void main() { // Also check that the button alignment is true to expectations, even with // child stretching to fill overscroll - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect(tester.getBottomLeft(button).dy, equals(600.0)); expect(tester.getCenter(button).dx, equals(400.0)); @@ -447,7 +447,7 @@ void main() { alignment: Alignment.center, child: Padding( padding: const EdgeInsets.all(50.0), - child: RaisedButton( + child: ElevatedButton( child: const Text('center button'), onPressed: () {}, ), @@ -466,7 +466,7 @@ void main() { equals(148.0), ); // Check that the button alignment is true to expectations - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect(tester.getBottomLeft(button).dy, equals(550.0)); expect(tester.getCenter(button).dx, equals(400.0)); @@ -567,7 +567,7 @@ void main() { child: Center(child: FlutterLogo(size: 100)), fit: FlexFit.loose, ), - RaisedButton( + ElevatedButton( child: const Text('Bottom'), onPressed: () {}, ), @@ -591,7 +591,7 @@ void main() { expect(tester.getCenter(logo), const Offset(400.0, 351.0)); // Also check that the button alignment is true to expectations. - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect( tester.renderObject(button).size, const Size(116.0, 48.0), @@ -674,7 +674,7 @@ void main() { color: Colors.blue, child: Align( alignment: Alignment.bottomCenter, - child: RaisedButton( + child: ElevatedButton( child: const Text('bottomCenter button'), onPressed: () {}, ), @@ -696,7 +696,7 @@ void main() { ); // Also check that the button alignment is true to expectations - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect(tester.getBottomLeft(button).dy, equals(600.0)); expect(tester.getCenter(button).dx, equals(400.0)); }); @@ -723,7 +723,7 @@ void main() { alignment: Alignment.center, child: Padding( padding: const EdgeInsets.all(50.0), - child: RaisedButton( + child: ElevatedButton( child: const Text('center button'), onPressed: () {}, ), @@ -743,7 +743,7 @@ void main() { ); // Check that the button alignment is true to expectations - final Finder button = find.byType(RaisedButton); + final Finder button = find.byType(ElevatedButton); expect(tester.getBottomLeft(button).dy, equals(550.0)); expect(tester.getCenter(button).dx, equals(400.0)); diff --git a/packages/flutter/test/widgets/widget_inspector_test.dart b/packages/flutter/test/widgets/widget_inspector_test.dart index 1f9a16e741..1d652b2834 100644 --- a/packages/flutter/test/widgets/widget_inspector_test.dart +++ b/packages/flutter/test/widgets/widget_inspector_test.dart @@ -276,7 +276,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { final GlobalKey topButtonKey = GlobalKey(); Widget selectButtonBuilder(BuildContext context, VoidCallback onPressed) { - return Material(child: RaisedButton(onPressed: onPressed, key: selectButtonKey)); + return Material(child: ElevatedButton(onPressed: onPressed, key: selectButtonKey, child: null)); } // State type is private, hence using dynamic. dynamic getInspectorState() => inspectorKey.currentState; @@ -294,14 +294,14 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { child: Material( child: ListView( children: [ - RaisedButton( + ElevatedButton( key: topButtonKey, onPressed: () { log.add('top'); }, child: const Text('TOP'), ), - RaisedButton( + ElevatedButton( onPressed: () { log.add('bottom'); }, @@ -376,7 +376,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { final GlobalKey inspectorKey = GlobalKey(); Widget selectButtonBuilder(BuildContext context, VoidCallback onPressed) { - return Material(child: RaisedButton(onPressed: onPressed, key: selectButtonKey)); + return Material(child: ElevatedButton(onPressed: onPressed, key: selectButtonKey, child: null)); } // State type is private, hence using dynamic. dynamic getInspectorState() => inspectorKey.currentState;