import 'package:http/http.dart' as http;
void main() async {
var headers = {
'Content-Type': 'application/json',
'x-tggl-api-key': 'API_KEY',
};
var data = '{"userId":"foo","email":"foo@gmail.com"}';
var url = Uri.parse('https://api.tggl.io/flags');
var res = await http.post(url, headers: headers, body: data);
if (res.statusCode != 200) throw Exception('http.post error: statusCode= ${res.statusCode}');
print(res.body);
}
Empower product and marketing teams to experiment within safe boundaries set by your engineering team.
Your app is instantly updated when a flag is updated, no need to write code and deploy the new version.