VooOptions class

Configuration options for Voo initialization.

These options configure the local behavior of Voo packages. For API and sync configuration, use VooConfig instead.

Migration from customConfig

Previously, device and user info was passed via customConfig:

// Old way (deprecated)
VooOptions(customConfig: {'deviceId': '...', 'userId': '...'})

// New way
await Voo.initializeApp(
  config: VooConfig(endpoint: '...', apiKey: '...', projectId: '...'),
);
// Device info is auto-collected, user set via Voo.setUserId()
Annotations

Constructors

VooOptions({bool enableDebugLogging = kDebugMode, bool autoRegisterPlugins = true, @Deprecated('Use VooConfig for API/sync config. Device info is now auto-collected.') Map<String, dynamic> customConfig = const {}, Duration initializationTimeout = const Duration(seconds: 10), String? appName, String? appVersion, String environment = 'development', bool enableLocalPersistence = true, int maxLocalStorageMB = 100, bool autoCollectDeviceInfo = true})
const
VooOptions.development({String? appName, String? appVersion, bool autoCollectDeviceInfo = true})
Create options for development environment.
factory
VooOptions.production({String? appName, String? appVersion, bool autoCollectDeviceInfo = true})
Create options for production environment.
factory

Properties

appName String?
App name for identification.
final
appVersion String?
App version for tracking.
final
autoCollectDeviceInfo bool
Whether to automatically collect device information.
final
autoRegisterPlugins bool
Automatically register discovered plugins.
final
customConfig Map<String, dynamic>
Custom configuration that can be accessed by plugins.
final
enableDebugLogging bool
Enable debug logging for Voo packages.
final
enableLocalPersistence bool
Enable local persistence for data.
final
environment String
Environment (development, staging, production).
final
hashCode int
The hash code for this object.
no setteroverride
initializationTimeout Duration
Timeout for plugin initialization.
final
maxLocalStorageMB int
Maximum local storage size in MB.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? enableDebugLogging, bool? autoRegisterPlugins, Map<String, dynamic>? customConfig, Duration? initializationTimeout, String? appName, String? appVersion, String? environment, bool? enableLocalPersistence, int? maxLocalStorageMB, bool? autoCollectDeviceInfo}) VooOptions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override