ChicoOnce class
Runs an action at most once until reset.
final once = ChicoOnce();
onPressed: () => once.run(() => openPaywall());
For named app-wide gates, use ChicoOnceKey.
Constructors
- ChicoOnce()
- Creates a one-shot gate.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Allows run again.
-
run(
void action()) → void -
Runs
actiononly the first time. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited