StreamFeedClient constructor
StreamFeedClient(})
- Instantiate a new client (server side) with
StreamFeedClient.connect
using your apisecret
parameter andapiKey
var client = StreamFeedClient('YOUR_API_KEY',secret: 'API_KEY_SECRET');
- Create a token for user with id "the-user-id"
var userToken = client.frontendToken('the-user-id');
- if you are using the SDK client side, get a userToken in your dashboard
and pass it to StreamFeedClient using the
token
parameter andapiKey
var client = StreamFeedClient('YOUR_API_KEY',token: Token('userToken'));
Implementation
factory StreamFeedClient(
String apiKey, {
String? secret,
String? appId,
StreamHttpClientOptions? options,
Runner runner = Runner.client,
StreamAPI? api,
String fayeUrl = 'wss://faye-us-east.stream-io-api.com/faye',
Level logLevel = Level.WARNING,
LogHandlerFunction? logHandlerFunction,
}) =>
StreamFeedClientImpl(
apiKey,
secret: secret,
appId: appId,
options: options,
runner: runner,
api: api,
fayeUrl: fayeUrl,
logLevel: logLevel,
logHandlerFunction: logHandlerFunction,
);