Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test InputDecoration API examples #148560

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

NobodyForNothing
Copy link
Contributor

Add tests for InputDecoration API example as part of #130459. Updates examples that use the deprecated MaterialState to use WidgetState. Tests files: input_decoration.0.dart, input_decoration.1.dart, input_decoration.2.dart, input_decoration.3.dart, input_decoration.widget_state.0.dart, input_decoration.widget_state.1.dart, input_decoration.prefix_icon_constraints.0.dart, input_decoration.suffix_icon_constraints.0.dart, and input_decoration.label.0.dart

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels May 17, 2024
@github-actions github-actions bot added the f: material design flutter/packages/flutter/material repository. label May 18, 2024
@Piinks
Copy link
Contributor

Piinks commented May 22, 2024

@NobodyForNothing thanks for contributing! It looks like there are some failing checks, can you take a look?

Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tests collection!

greaterThan(tester.getSize(smallerIcon).longestSide));
});

testWidgets('Is suffix icon', (WidgetTester tester) async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
testWidgets('Is suffix icon', (WidgetTester tester) async {
testWidgets('Is suffix icon', (WidgetTester tester) async {

Not sure what this means.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the description to suffixIcons are placed right of hintText. The goal of this text is to ensure the icon in the example is actually a suffix icon (after content) and not a prefix icon.

While this is not the main point the example is trying to illustrate, I believe it is necessary to differentiate between the prefixIconConstraints and the suffixIconConstraints example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants