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

discontinuedreplaced by: conditional_trigger
outdated

Make it easier for you to set the Case for specific method.

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
0
points
15
downloads

Publisher

verified publisherlamnhan.dev

Weekly Downloads

Make it easier for you to set the Case for specific method.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

package_info_plus, satisfied_version, shared_preferences, update_helper

More

Packages that depend on condition_helper