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

[ Feature Request ] Add conditional extension #117

Open
rakeshlanjewar opened this issue Jul 3, 2021 · 3 comments
Open

[ Feature Request ] Add conditional extension #117

rakeshlanjewar opened this issue Jul 3, 2021 · 3 comments
Labels
enhancement New feature or request VOC Feature

Comments

@rakeshlanjewar
Copy link

Is your feature request related to a problem? Please describe.
Yes, This will eliminate the ugly if-else blocks. I don't know it is feasible or not. Just an idea.

Describe the solution you'd like
I want to achieve something like this.

.when(condition,stylesWhenTrue )


example 

'John'.text.size(30).when(1==1, ___ ).color(Colors.white).make()

Additional context
This is just an idea that is similar to laravel query builder

https://laravel.com/docs/8.x/queries#conditional-clauses

@iampawan iampawan added the enhancement New feature or request label Jul 7, 2021
delikin added a commit to delikin/VelocityX that referenced this issue Sep 17, 2021
[child] argument was never used.

Found while working on enhancement request iampawan#117
@GautamSharma05
Copy link

I want To work on this issue

@iampawan
Copy link
Owner

@delikin @GautamSharma05 go ahead

@dhsont
Copy link

dhsont commented Jan 22, 2023

it will be nice addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request VOC Feature
Projects
None yet
Development

No branches or pull requests

4 participants