unleash 0.2.0 copy "unleash: ^0.2.0" to clipboard
unleash: ^0.2.0 copied to clipboard

outdated

A dart client for Unleash. Unleash is a simple and easy to use feature toggle (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://gitlab.com/api/v4/feature_flags/unleash/18585314'),
    ),
    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');
}
20
likes
0
pub points
81%
popularity

Publisher

verified publishergetunleash.io

A dart client for Unleash. Unleash is a simple and easy to use feature toggle (feature flag) service.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, meta, path

More

Packages that depend on unleash