Unverified Commit 900e5405 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Replace `ListTile` with `Chip` in the `debugCheckHasMaterial control test` (#102311)

parent 4a72c534
...@@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart'; ...@@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
void main() { void main() {
testWidgets('debugCheckHasMaterial control test', (WidgetTester tester) async { testWidgets('debugCheckHasMaterial control test', (WidgetTester tester) async {
await tester.pumpWidget(const ListTile()); await tester.pumpWidget(const Chip(label: Text('label')));
final dynamic exception = tester.takeException(); final dynamic exception = tester.takeException();
expect(exception, isFlutterError); expect(exception, isFlutterError);
final FlutterError error = exception as FlutterError; final FlutterError error = exception as FlutterError;
...@@ -28,7 +28,7 @@ void main() { ...@@ -28,7 +28,7 @@ void main() {
error.toStringDeep(), error.toStringDeep(),
'FlutterError\n' 'FlutterError\n'
' No Material widget found.\n' ' No Material widget found.\n'
' ListTile widgets require a Material widget ancestor.\n' ' Chip widgets require a Material widget ancestor.\n'
' In material design, most widgets are conceptually "printed" on a\n' ' In material design, most widgets are conceptually "printed" on a\n'
" sheet of material. In Flutter's material library, that material\n" " sheet of material. In Flutter's material library, that material\n"
' is represented by the Material widget. It is the Material widget\n' ' is represented by the Material widget. It is the Material widget\n'
...@@ -39,7 +39,7 @@ void main() { ...@@ -39,7 +39,7 @@ void main() {
' one, or use a widget that contains Material itself, such as a\n' ' one, or use a widget that contains Material itself, such as a\n'
' Card, Dialog, Drawer, or Scaffold.\n' ' Card, Dialog, Drawer, or Scaffold.\n'
' The specific widget that could not find a Material ancestor was:\n' ' The specific widget that could not find a Material ancestor was:\n'
' ListTile\n' ' Chip\n'
' The ancestors of this widget were:\n' ' The ancestors of this widget were:\n'
' [root]\n', ' [root]\n',
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment