Skip to content

Color of text form field value is overridden to black in CI goldens #162

@ValentinVignal

Description

@ValentinVignal

Is there an existing issue for this?

  • I have searched the existing issues.

Version

0.12.1

Description

When setting the style (color) in a text form field, the color of the value is overridden to black for value.

Steps to reproduce

Generates the goldens of the code (or checkout https://github.com/ValentinVignal/flutter_app_stable/tree/alchemist/style-of-text-form-field)

import 'package:alchemist/alchemist.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('Counter increments smoke test', (WidgetTester tester) async {
    await tester.pumpWidget(
      MaterialApp(
        home: Scaffold(
          body: TextFormField(
            initialValue: 'value',
            style: TextStyle(color: Colors.red),
          ),
        ),
      ),
    );

    await expectLater(
      find.byType(MaterialApp),
      matchesGoldenFile('golden/widget.test.png'),
    );
  });

  goldenTest(
    'test',
    fileName: 'file_name',
    builder: () {
      return GoldenTestScenario(
        constraints: BoxConstraints.tight(Size.square(300)),
        name: 'test',
        child: TextFormField(
          initialValue: 'value',
          style: TextStyle(color: Colors.red),
        ),
      );
    },
  );
}

Expected behavior

I'd expect the color of the label to not be black when I set it to another value

Screenshots

Normal golden:

Image

Platform golden:

Image

CI golden:

Image

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions