https://github.com/jeebb/availability
A flutter plugin which is similar to https://api.flutter.dev/flutter/widgets/Visibility-class.html but with WidgetBuilder.
https://github.com/jeebb/availability
Last synced: 8 months ago
JSON representation
A flutter plugin which is similar to https://api.flutter.dev/flutter/widgets/Visibility-class.html but with WidgetBuilder.
- Host: GitHub
- URL: https://github.com/jeebb/availability
- Owner: jeebb
- License: mit
- Created: 2021-06-19T10:29:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-22T10:51:00.000Z (about 5 years ago)
- Last Synced: 2023-08-20T21:27:23.112Z (almost 3 years ago)
- Language: Dart
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```dart
Availability(
available: ,
childBuilder: (BuildContext context) => ,
)
```
or
```dart
Availability(
available: ,
childBuilder: (BuildContext context) => ,
elseBuilder: (BuildContext context) => ,
)
```
*** Similar dart code without Availability:
```dart
if () {
return ;
} else {
return ;
}
```