vwo_fme_flutter_sdk 1.1.0+1 copy "vwo_fme_flutter_sdk: ^1.1.0+1" to clipboard
vwo_fme_flutter_sdk: ^1.1.0+1 copied to clipboard

FME is a server-side solution where you integrate VWO's SDK in your server codebase and can run feature tests, rollouts, personalization and experimentation campaigns.

VWO FME Flutter SDK #

License

SDK Installation #

Add below dependency in your project's pubspec.yaml.

vwo_fme_flutter_sdk: <latest version>

Latest version of SDK can be found in pub.dev

For iOS, install the CocoaPods dependencies by running below command. Supports iOS version 12.0 and above.

cd ios && pod install

Official Documentation #

For more detailed documentation, please refer here.

Basic Usage #

import 'package:vwo_fme_flutter_sdk/vwo/models/vwo_init_options.dart';
import 'package:vwo_fme_flutter_sdk/vwo/models/vwo_context.dart';
import 'package:vwo_fme_flutter_sdk/vwo/models/get_flag.dart';
import 'package:vwo_fme_flutter_sdk/vwo.dart';

// Initialize the VWO SDK and get the initialization status.
var initOptions = VWOInitOptions(sdkKey: sdkKey, accountId: accountId);

VWO? vwoClient = await VWO.init(initOptions);
// Define the user context with user ID and custom variables.
final vwoContext = VWOContext(
  userId: userId,
  customVariables: {'number': 12, 'key2': 'value2'},
  ipAddress: "1.0.0.1",
  userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (HTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
);

// Get the feature flag result.
final GetFlag? flagResult = await vwoClient?.getFlag(
  flagName: flagName,
  vwoContext: vwoContext,
);

// Get the isEnabled status of the flag.
bool isEnabled = flagResult.isEnabled();

// Get a specific variable from the flag, with a default value.
dynamic color = flagResult.getVariable('feature_flag_variable_key', 'default_value');

// Get all variables associated with the flag.
dynamic variables = flagResult.getVariables();

// Track an event with the given event name and user context.
final trackingResult = await vwoClient?.trackEvent(
  eventName: eventName,
  context: userContext,
);

// Set a user attribute with the given key, value, and user context.
final success = await vwoClient?.setAttribute(
  attributeKey: attributeName,
  attributeValue: attributeValue,
  context: userContext,
);

Authors #

Changelog #

Refer CHANGELOG.md

Contributing #

Please go through our contributing guidelines

Code of Conduct #

Code of Conduct

License #

Apache License, Version 2.0

Copyright 2024 Wingify Software Pvt. Ltd.

1
likes
145
points
0
downloads

Publisher

verified publishervwo.com

Weekly Downloads

FME is a server-side solution where you integrate VWO's SDK in your server codebase and can run feature tests, rollouts, personalization and experimentation campaigns.

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on vwo_fme_flutter_sdk