Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Replace ListTile with Chip in the `debugCheckHasMaterial control …
Browse files Browse the repository at this point in the history
…test` (#102311)
  • Loading branch information
TahaTesser authored Apr 21, 2022
1 parent 4a72c53 commit 900e540
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/flutter/test/material/debug_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';

void main() {
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();
expect(exception, isFlutterError);
final FlutterError error = exception as FlutterError;
Expand All @@ -28,7 +28,7 @@ void main() {
error.toStringDeep(),
'FlutterError\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'
" sheet of material. In Flutter's material library, that material\n"
' is represented by the Material widget. It is the Material widget\n'
Expand All @@ -39,7 +39,7 @@ void main() {
' one, or use a widget that contains Material itself, such as a\n'
' Card, Dialog, Drawer, or Scaffold.\n'
' The specific widget that could not find a Material ancestor was:\n'
' ListTile\n'
' Chip\n'
' The ancestors of this widget were:\n'
' [root]\n',
);
Expand Down

0 comments on commit 900e540

Please sign in to comment.