condition_helper 0.0.5 copy "condition_helper: ^0.0.5" to clipboard
condition_helper: ^0.0.5 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
150
points
15
downloads

Publisher

verified publisherlamnhan.dev

Weekly Downloads

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

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