Disclaimer: This website requires JavaScript to function properly. Some features may not work as expected. Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

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:

  1. Define your interface with the new methods.
  2. Implement your interface.
  3. Add your class to the GetIt Service Locator in lib/core/injection/injection_container.dart.
  4. (Optional) Add your class to the CoreServiceProvider: lib/features/domain/service/interfaces/core_service_provider_interface.dart and lib/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.


Next

After customizing the SDK, you can deploy your application to the app stores.