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

Flutter plugin for Flagr

Flagr Client SDK for Flutter #

This is an unofficial Flagr Client SDK for Flutter. Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is "/api/v1". Flagr Open-Source.

Getting Started #

To use this plugin, add flutter_flagr as a dependency in your pubspec.yaml file.

dependencies:
  flutter_flagr: ^0.0.1

To start using the Flutter Flagr package within your project, import the following package.

import 'package:flutter_flagr/flagr.dart';

Before using Flutter Flagr, you must first have ensured you have initialized Flutter Flagr.

Future<void> main() async {
  await Flagr.init('https://try-flagr.herokuapp.com/api/v1');

  runApp(MyApp());
}

To create a new Flagr instance, call the instance getter on Flagr:

final flagr = Flagr.instance;

Checking if a feature is enabled

// Will return `false` if it cannot find the flag key. 
flagr.isEnabled('flag_key')

// Specifying a default value:
flagr.isEnabled('flag_key', defaultValue: true)
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Flutter plugin for Flagr

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, http

More

Packages that depend on flutter_flagr