Repository: flutter/flutter
File: packages/flutter/test/material/dialog_test.dart (Dart)

Code before:
    await tester.pumpWidget(_buildAppWithDialog(dialog));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();

    final Material materialWidget = _getMaterialFromDialog(tester);
    expect(materialWidget.clipBehavior, Clip.antiAlias);
  });

  testWidgets('SimpleDialog Custom Content Text Style', (WidgetTester tester) async {
    const String contentText = 'Content';
    const TextStyle contentTextStyle = TextStyle(color: Colors.pink);
    const SimpleDialog dialog = SimpleDialog(
      contentTextStyle: contentTextStyle,
      children: <Widget>[Text(contentText)],
    );
    await tester.pumpWidget(_buildAppWithDialog(dialog));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();

    final RenderParagraph content = _getTextRenderObjectFromDialog(tester, contentText);
    expect(content.text.style, contentTextStyle);
  });

  testWidgets('SimpleDialog Custom Content Text Style - DialogTheme', (WidgetTester tester) async {
    const String contentText = 'Content';
    const TextStyle contentTextStyle = TextStyle(color: Colors.orange);
    const SimpleDialog dialog = SimpleDialog(children: <Widget>[Text(contentText)]);
    final ThemeData theme = ThemeData(
      dialogTheme: const DialogThemeData(contentTextStyle: contentTextStyle),
    );
    await tester.pumpWidget(_buildAppWithDialog(dialog, theme: theme));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();

    final RenderParagraph content = _getTextRenderObjectFromDialog(tester, contentText);
    expect(content.text.style, contentTextStyle);
  });

  testWidgets('Material3 - SimpleDialog Custom Content Text Style - Theme', (WidgetTester tester) async {
    const String contentText = 'Content';
    const TextStyle contentTextStyle = TextStyle(color: Colors.purple);
    const SimpleDialog dialog = SimpleDialog(children: <Widget>[Text(contentText)]);
    final ThemeData theme = ThemeData(
      textTheme: const TextTheme(bodyMedium: contentTextStyle),
    );
    await tester.pumpWidget(_buildAppWithDialog(dialog, theme: theme));

    await tester.tap(find.text('X'));

Review comment (suggestion):
The linux analyzer is complaining some type issues but should be simple to fix:)
<img width="1714" height="387" alt="Image" src="https://github.com/user-attachments/assets/54c938ba-bf67-4eac-acb4-80da3ffb5e30" />

Code after:
    await tester.pumpWidget(_buildAppWithDialog(dialog));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();

    final Material materialWidget = _getMaterialFromDialog(tester);
    expect(materialWidget.clipBehavior, Clip.antiAlias);
  });

  testWidgets('SimpleDialog Custom Content Text Style', (WidgetTester tester) async {
    const contentText = 'Content';
    const contentTextStyle = TextStyle(color: Colors.pink);
    const dialog = SimpleDialog(
      contentTextStyle: contentTextStyle,
      children: <Widget>[Text(contentText)],
    );
    await tester.pumpWidget(_buildAppWithDialog(dialog));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();

    final RenderParagraph content = _getTextRenderObjectFromDialog(tester, contentText);
    expect(content.text.style, contentTextStyle);
  });

  testWidgets('SimpleDialog Custom Content Text Style - DialogTheme', (WidgetTester tester) async {
    const contentText = 'Content';
    const contentTextStyle = TextStyle(color: Colors.orange);
    const dialog = SimpleDialog(children: <Widget>[Text(contentText)]);
    final theme = ThemeData(dialogTheme: const DialogThemeData(contentTextStyle: contentTextStyle));
    await tester.pumpWidget(_buildAppWithDialog(dialog, theme: theme));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();

    final RenderParagraph content = _getTextRenderObjectFromDialog(tester, contentText);
    expect(content.text.style, contentTextStyle);
  });

  testWidgets('Material3 - SimpleDialog Custom Content Text Style - Theme', (
    WidgetTester tester,
  ) async {
    const contentText = 'Content';
    const contentTextStyle = TextStyle(color: Colors.purple);
    const dialog = SimpleDialog(children: <Widget>[Text(contentText)]);
    final theme = ThemeData(textTheme: const TextTheme(bodyMedium: contentTextStyle));
    await tester.pumpWidget(_buildAppWithDialog(dialog, theme: theme));

    await tester.tap(find.text('X'));
    await tester.pumpAndSettle();