condition_helper 0.0.6 copy "condition_helper: ^0.0.6" to clipboard
condition_helper: ^0.0.6 copied to clipboard

Make it easier for you to set the conditions (such as min days or min calls) for specific method or widget.

Condition Helper #

This plugin will make it easier for you to set the Case for specific method.

Usage #

This method will do nothing if the current platform is other than Android and iOS.

final condition = ConditionHelper('SurveyBanner');

Use this method to check the Case:

final state = await condition.check();

if (state == ConditionState.satisfied) {
    // Do something
}

Or if you want to show a Widget

FutureBuilder(
    future: ConditionHelper('SurveyBanner').check(),
    build: (context, snapshot) {
        if (snapshot.data != ConditionState.satisfied) {
            return SizedBox.shrink();
        }

        return SurveyBanner();
    }
);
0
likes
150
points
15
downloads

Publisher

verified publisherlamnhan.dev

Weekly Downloads

Make it easier for you to set the conditions (such as min days or min calls) for specific method or widget.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, package_info_plus, satisfied_version, shared_preferences, update_helper

More

Packages that depend on condition_helper