0 purchases
availability
Availability #
A simple if-else widget renderer in an object-oriented way. You can find it similar to Visibility, but with WidgetBuilder usage. With this, the child widget is not put into context until the condition is satisfied.
#code-for-fun
Getting Started #
Usage: #
Availability(
available: <condition>,
childBuilder: (BuildContext context) => <widget>,
)
copied to clipboard
or
Availability(
available: <condition>,
childBuilder: (BuildContext context) => <widget>,
elseBuilder: (BuildContext context) => <another_widget>,
)
copied to clipboard
*** Similar dart code without Availability:
if (<condition>) {
return <widget>;
} else {
return <another_widget>;
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.