Class configuration
Extend Optimizely's classes to add functionality to your app.
The Optimizely Configured Commerce Mobile SDK relies on GetIt for the service locator. To add a new service, follow these steps:
- Define your interface with the new methods.
- Implement your interface.
- Add your class to the GetIt Service Locator in
lib/core/injection/injection_container.dart
. - (Optional) Add your class to the
CoreServiceProvider
:lib/features/domain/service/interfaces/core_service_provider_interface.dart
andlib/features/domain/service/core_service_provider.dart
When added in injection_container.dart
, you can access your service from anywhere using CoreServiceProvider
or with sl<YourInterfaceName>().yourProperty
.
Updated 2 months ago
Next
After customizing the SDK, you can deploy your application to the app stores.