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

Create StyledImage #185

Merged
merged 8 commits into from
Jan 31, 2024
Merged

Create StyledImage #185

merged 8 commits into from
Jan 31, 2024

Conversation

tilucasoli
Copy link
Collaborator

@tilucasoli tilucasoli commented Jan 30, 2024

Issue ticket number

resolve #166

Describe your changes

  • Create StyledImage and a doc for it;
  • Implement new utilities, RectUtility and FilterQualityUtility;
  • Create new test cases;
  • Add test_resources to test Image widget.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Docs (changes to the documentation)
  • Test (adding missing tests, refactoring tests; no production code change)

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link

vercel bot commented Jan 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
mix-docs ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2024 6:50pm

@tilucasoli tilucasoli requested a review from leoafarias January 30, 2024 01:38
Copy link
Member

@leoafarias leoafarias left a comment

Choose a reason for hiding this comment

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

Looking really good!

lib/src/specs/image/image_spec.dart Outdated Show resolved Hide resolved

BlendModeUtility<ImageSpecAttribute> get blendMode {
return BlendModeUtility((blendMode) => _only(blendMode: blendMode));
}
Copy link
Member

Choose a reason for hiding this comment

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

Let's also add a call() method. One to keep in mind, though, is the call() method takes the actual Flutter core classes, not Dtos, if they exist.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will call() become the same as _only() In this case?

Copy link
Member

Choose a reason for hiding this comment

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

One convention that I have been falling is called (), which is similar to _only or only, but it does not replace. call() has the Flutter core classes, and only has things like DTOs and etc.

test/src/specs/image/image_attribute_test.dart Outdated Show resolved Hide resolved
test/src/specs/image/image_widget_test.dart Outdated Show resolved Hide resolved
@tilucasoli tilucasoli requested a review from leoafarias January 30, 2024 16:29
lib/src/specs/image/image_util.dart Outdated Show resolved Hide resolved

BlendModeUtility<ImageSpecAttribute> get blendMode {
return BlendModeUtility((blendMode) => _only(blendMode: blendMode));
}
Copy link
Member

Choose a reason for hiding this comment

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

One convention that I have been falling is called (), which is similar to _only or only, but it does not replace. call() has the Flutter core classes, and only has things like DTOs and etc.

Copy link
Member

@leoafarias leoafarias left a comment

Choose a reason for hiding this comment

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

LGTM

@leoafarias leoafarias merged commit b209822 into main Jan 31, 2024
4 checks passed
@leoafarias leoafarias deleted the feat/issue-166 branch January 31, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The mix doesn't have a StyledImage with its own attributes
2 participants