You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configuration is not defined when initializing createClient #182
specify import 'package:segment_analytics/state.dart' in Installation / Usage
Setting up the client
The package exposes a method called createClient which we can use to create the Segment Analytics client. This central client manages all our tracking events. It is recommended you add this as a property on your main app's state class.
> const writeKey = 'SEGMENT_API_KEY';
> final analytics = createClient(Configuration(writeKey));
You must pass at least the writeKey. Additional configuration options are listed below:
Activity
chownation commentedon Sep 21, 2025
specify
import 'package:segment_analytics/state.dart'inInstallation/Usage[Content]: add to https://pub.dev/packages/segment_analytics#setting-up-the-client