buildcondition

Creator: coderz1093

Last updated:

0 purchases

buildcondition Image
buildcondition Images

Languages

Categories

Add to Cart

Description:

buildcondition

BuildCondition #
Synchronous conditional widget renderer.
Lets you declaratively render a widget based on a condition, using this you can get rid of
implicit conditional statements in your code to display/hide a widget.
Usage #
After following the installation guide, you can use this widget as follow:
BuildCondition(
condition: true,
builder: (context) {
return Text('This gets rendered');
},
)

BuildCondition(
condition: false,
builder: (context) {
return Text('This does not get rendered, an empty Container will be rendered');
},
)

BuildCondition(
condition: false,
builder: (context) {
return Text('This does not get rendered, as fallback is not null, it is used to render the fallback widget.');
},
fallback: (context) {
return Text('This gets rendered');
}
)
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.