iampawan / VelocityX

A minimalist Flutter framework for rapidly building Flutter apps.
https://velocityx.dev
MIT License
1.43k stars 190 forks source link

[ Feature Request ] Add conditional extension #117

Open rakeshlanjewar opened 3 years ago

rakeshlanjewar commented 3 years ago

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

GautamSharma05 commented 2 years ago

I want To work on this issue

iampawan commented 2 years ago

@delikin @GautamSharma05 go ahead

dhsont commented 1 year ago

it will be nice addition