AutoTrackConfig constructor

AutoTrackConfig({
  1. String? host,
  2. String? appKey = '',
  3. String? appSecret = '',
  4. String? trackId,
  5. String? userId,
  6. Function? signature,
  7. String? uniqueId,
  8. List<AutoTrackPageConfig<Widget>> pageConfigs = const [],
  9. bool useCustomRoute = false,
  10. List<Key> ignoreElementKeys = const [],
  11. List<String> ignoreElementStringKeys = const [],
  12. bool enablePageView = true,
  13. bool enablePageLeave = false,
  14. bool enableClick = true,
  15. bool enableUpload = false,
  16. bool enableDrag = false,
  17. bool enableIgnoreNullKey = false,
  18. int? uploadInterval,
})

Implementation

AutoTrackConfig({
  this.host,
  this.appKey = '',
  this.appSecret = '',
  this.trackId,
  this.userId,
  this.signature,
  this.uniqueId,
  this.pageConfigs = const [],
  this.useCustomRoute = false,
  this.ignoreElementKeys = const [],
  this.ignoreElementStringKeys = const [],
  this.enablePageView = true,
  this.enablePageLeave = false,
  this.enableClick = true,
  this.enableUpload = false,
  this.enableDrag = false,
  this.enableIgnoreNullKey = false,
  this.uploadInterval
}) {
  trackId ??= const Uuid().v4().replaceAll('-', '');
  signature ??= (t) => sha256.convert(utf8.encode('$appKey$t$appSecret')).toString();
}