greenflags 0.1.0 copy "greenflags: ^0.1.0" to clipboard
greenflags: ^0.1.0 copied to clipboard

Dart/Flutter SDK for GreenFlags feature flags. Snapshot + cache reads, polling, geofence evaluation and offline persistence — evaluated at the edge.

example/main.dart

import 'package:greenflags/greenflags.dart';

Future<void> main() async {
  final flags = GreenFlagsClient(
    url: 'https://app.greenflags.dev',
    apiToken: const String.fromEnvironment(
      'GREENFLAGS_TOKEN',
      defaultValue: 'gf_your_token_here',
    ),
  );

  await flags.refresh();

  for (final flag in flags.getAllFlags()) {
    print('${flag.key} (${flag.type.wire}) = ${flag.value}');
  }

  if (flags.isEnabled('new-checkout')) {
    print('new checkout is ON');
  }

  flags.dispose();
}
0
likes
160
points
0
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Dart/Flutter SDK for GreenFlags feature flags. Snapshot + cache reads, polling, geofence evaluation and offline persistence — evaluated at the edge.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http

More

Packages that depend on greenflags