conditional 0.0.1 conditional: ^0.0.1 copied to clipboard
A convenience widget that provides a way to use different widgets based on the condition
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add conditional
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
conditional: ^0.0.1
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:conditional/conditional.dart';