Frontier class
The main class of the library. It is used to define and use strategies.
final frontier = Frontier();
frontier.use<GoogleStrategyOptions, User>(GoogleStrategy());
final user = await frontier.authenticate<GoogleStrategyOptions, User>(GoogleStrategyOptions());
print(user);
Constructors
- Frontier()
- Create a new instance of Frontier.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate<
T extends StrategyOptions> (String strategy, StrategyRequest input) → Future - Authenticate using the defined strategy. If no strategy is defined, an exception is thrown.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
use<
T extends StrategyOptions> (Strategy< T> strategy) → void - Define a strategy to be used. If a strategy is already defined, an exception is thrown.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited