iws_experiments 0.0.1 copy "iws_experiments: ^0.0.1" to clipboard
iws_experiments: ^0.0.1 copied to clipboard

A Flutter package for managing A/B testing and feature experiments with pre-built UI components and API integration.

example/README.md

IWS Experiments Examples #

This directory contains examples demonstrating how to use the iws_experiments package.

Examples Included #

  1. basic_usage.dart - Basic experiment fetching and toggling
  2. experiment_list_example.dart - Using the ExperimentList widget
  3. experiment_tile_example.dart - Using the ExperimentListTile widget
  4. custom_ui_example.dart - Building custom UI with experiment data
  5. complete_app_example.dart - A complete Flutter app integrating all features

Running the Examples #

Setting up the API Key #

Before running any example, make sure to set your API key:

flutter run --dart-define=IWS_API_KEY=your_api_key_here

Running Individual Examples #

Each example is a standalone Dart file that demonstrates specific functionality. You can incorporate these patterns into your own application.

Example Overview #

Basic Usage #

Shows how to:

  • Fetch experiments
  • Fetch user-specific experiments
  • Toggle experiment participation
  • Handle errors

Experiment List Widget #

Demonstrates:

  • Displaying all experiments in a list
  • Handling experiment updates
  • User-specific experiment views

Experiment Tile Widget #

Shows:

  • Displaying individual experiments
  • Toggle functionality
  • Loading states

Custom UI Example #

Illustrates:

  • Building custom interfaces with experiment data
  • Advanced filtering and sorting
  • Custom styling

Complete App Example #

A full Flutter application that:

  • Integrates all package features
  • Shows best practices
  • Demonstrates proper error handling
  • Includes navigation and state management
0
likes
140
points
9
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package for managing A/B testing and feature experiments with pre-built UI components and API integration.

Homepage

License

unknown (license)

Dependencies

flutter, iws_device_info, iws_http

More

Packages that depend on iws_experiments