unleash 0.4.0 icon indicating copy to clipboard operation
unleash: ^0.4.0 copied to clipboard

A Server Side Dart SDK for Unleash. Unleash is an open-source feature flag service.

example/example.dart

import 'dart:async';

import 'package:unleash/unleash.dart';

Future<void> main() async {
  final unleash = await Unleash.init(
    UnleashSettings(
        appName: 'debug',
        instanceId: 'Q8XiLix59zo2NytFGd1b',
        unleashApi: Uri.parse('https://unleash.herokuapp.com/api/'),
        apiToken:
            '*:development.ba76487db29d7ef2557977a25b477c2e6288e2d9334fd1b91f63e2a9'),
    onUpdate: () {
      print('refreshed feature toggles');
    },
  );
  print(unleash.isEnabled('awesome_feature'));
  // wait some time so that toggles can be polled a few times
  // and dispose unleash at the end of it
  Timer(
    const Duration(seconds: 60),
    unleash.dispose,
  );
  print('finished');
}
11
likes
130
pub points
79%
popularity

Publisher

verified publisher icongetunleash.io

A Server Side Dart SDK for Unleash. Unleash is an open-source feature flag service.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.Apache-2.0 (LICENSE)

Dependencies

http, meta, path

More

Packages that depend on unleash