{"id":32279935,"url":"https://github.com/genkey6/ld-relay-client-dart","last_synced_at":"2026-02-22T03:40:42.380Z","repository":{"id":211564906,"uuid":"729450787","full_name":"genkey6/ld-relay-client-dart","owner":"genkey6","description":"A client implementation for Relay Proxy of LaunchDarkly in Dart","archived":false,"fork":false,"pushed_at":"2026-01-30T21:55:28.000Z","size":27,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-31T13:32:23.583Z","etag":null,"topics":["feature-flags","feature-toggles","launchdarkly"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genkey6.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-09T09:14:11.000Z","updated_at":"2024-11-27T03:53:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"571a1ee4-de39-4f02-8fa5-337a97b0c0b0","html_url":"https://github.com/genkey6/ld-relay-client-dart","commit_stats":null,"previous_names":["genkey6/ld-relay-client-dart"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/genkey6/ld-relay-client-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkey6%2Fld-relay-client-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkey6%2Fld-relay-client-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkey6%2Fld-relay-client-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkey6%2Fld-relay-client-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genkey6","download_url":"https://codeload.github.com/genkey6/ld-relay-client-dart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genkey6%2Fld-relay-client-dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29704418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T03:17:42.375Z","status":"ssl_error","status_checked_at":"2026-02-22T03:17:31.622Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feature-flags","feature-toggles","launchdarkly"],"created_at":"2025-10-23T00:38:02.861Z","updated_at":"2026-02-22T03:40:42.374Z","avatar_url":"https://github.com/genkey6.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ld-relay-client-dart\n[![GitHub Actions](https://github.com/genkey6/ld-relay-client-dart/actions/workflows/ci.yaml/badge.svg)](https://github.com/genkey6/ld-relay-client-dart/actions/workflows/ci.yaml)\n[![Pub](https://img.shields.io/pub/v/ld_relay_client.svg)](https://pub.dev/packages/ld_relay_client)\n\nA client implementation for [Relay Proxy](https://docs.launchdarkly.com/home/relay-proxy) of [LaunchDarkly](https://launchdarkly.com/) in Dart.\n\n## How to use\n### Step 1: Installation\n```\ndart pub add ld_relay_client\n```\n\n### Step 2: Initialize the client\n```dart\nimport 'package:ld_relay_client/ld_relay_client.dart';\nimport 'package:http/http.dart' as http;\nimport 'package:logger/logger.dart';\n\nfinal client = LDRelayClient(\n  LDRelayConfig(\n    sdkKey: '\u003cyour-server-sdk-key\u003e', // your LaunchDarkly server-side SDK key (caution: The SDK key should be kept a secret)\n    ldRelayBaseUrl: 'http://localhost:8030', // the base URL for Relay Proxy\n  ),\n  http.Client(),\n  Logger(),\n);\n```\n\n### Step 3: Evaluate the flag value and switch the logic\n```dart\n// with single context\nfinal evalResultWithSingleContext =\n    await client.boolVariation('flag-key1', false, {\n  'user': LaunchDarklyContextAttribute(key: 'user1'),\n});\n\nif (evalResultWithSingleContext) {\n  // do something\n} else {\n  // do something else\n}\n\n// with multi contexts\nfinal evalResultWithMultiContext =\n    await client.boolVariation('flag-key2', false, {\n  'user': LaunchDarklyContextAttribute(key: 'user2'),\n  'tenant': LaunchDarklyContextAttribute(key: 'tenant2'),\n});\n\nif (evalResultWithMultiContext) {\n  // do something\n} else {\n  // do something else\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenkey6%2Fld-relay-client-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenkey6%2Fld-relay-client-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenkey6%2Fld-relay-client-dart/lists"}