> For the complete documentation index, see [llms.txt](https://docs.winga.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.winga.me/integrations/flutter.md).

# Flutter / Dart

There is no dedicated `@winga/flutter` SDK. Use the [Evaluation API](/api-reference/evaluation-api.md) directly with the `http` package. Load the flag map once, then read it synchronously.

```dart
import 'package:http/http.dart' as http;
import 'dart:convert';

class WingaClient {
  final String apiKey;
  final String environment;
  Map<String, dynamic> _flags = {};

  WingaClient({required this.apiKey, required this.environment});

  Future<void> load() async {
    final response = await http.get(
      Uri.parse('https://api.winga.me/v1/flags?env=$environment'),
      headers: {'X-Winga-Key': apiKey},
    );
    if (response.statusCode == 200) {
      final data = jsonDecode(response.body);
      _flags = data['flags'] ?? {};
    }
  }

  bool isEnabled(String key) {
    return _flags[key]?['enabled'] ?? false;
  }
}

// Usage
final ff = WingaClient(apiKey: 'proj_live_xxx', environment: 'production');
await ff.load();

if (ff.isEnabled('new-onboarding')) {
  // show new onboarding
}
```

For realtime updates, subscribe to `GET /v1/stream?env=<environment>` with an SSE client package and replace `_flags` on each `data:` frame.
