{"id":32272595,"url":"https://github.com/smsimone/flutter-ditto","last_synced_at":"2026-02-22T03:03:38.881Z","repository":{"id":57699180,"uuid":"501342645","full_name":"smsimone/flutter-ditto","owner":"smsimone","description":"Flutter sdk to integrate Dittowords localizations inside your Flutter app","archived":false,"fork":false,"pushed_at":"2023-01-19T09:26:17.000Z","size":288,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-11T16:21:14.762Z","etag":null,"topics":["ditto","dittowords","flutter-localizations","localizations","remote-localization"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_ditto","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smsimone.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}},"created_at":"2022-06-08T17:10:29.000Z","updated_at":"2023-10-04T00:28:45.000Z","dependencies_parsed_at":"2023-02-10T22:01:03.428Z","dependency_job_id":null,"html_url":"https://github.com/smsimone/flutter-ditto","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/smsimone/flutter-ditto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsimone%2Fflutter-ditto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsimone%2Fflutter-ditto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsimone%2Fflutter-ditto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsimone%2Fflutter-ditto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smsimone","download_url":"https://codeload.github.com/smsimone/flutter-ditto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsimone%2Fflutter-ditto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29704401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"online","status_checked_at":"2026-02-22T02:00:08.193Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ditto","dittowords","flutter-localizations","localizations","remote-localization"],"created_at":"2025-10-22T23:04:54.696Z","updated_at":"2026-02-22T03:03:38.876Z","avatar_url":"https://github.com/smsimone.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/smsimone"],"categories":[],"sub_categories":[],"readme":"[![wakatime](https://wakatime.com/badge/user/6de661cc-aaf6-48d1-b19c-3b8aa8990b73/project/e121e3ca-b7f1-4bf2-a1f7-25c659090e38.svg)](https://wakatime.com/badge/user/6de661cc-aaf6-48d1-b19c-3b8aa8990b73/project/e121e3ca-b7f1-4bf2-a1f7-25c659090e38)\n\n# Flutter_ditto\n\nThis packages aims to provide a simple integration with Dittowords localizations like it's done on React by [ditto-react](https://www.npmjs.com/package/ditto-react).\n\n\u003e Like my work?\n\u003e\n\u003e [![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/smsimone)\n\n## TODOS\n\n- [x] OTA updates for the translations\n- [x] Translations with plurals\n- [x] Translations with variables\n\n## Quick start\n\nTo integrate Ditto inside your app you simply have to replace the current `MaterialApp` with `DittoMaterialApp`.\n\n### Separated initialization\n\nYou can initialize `DittoStore` separately from `DittoMaterialApp` like\n\n```dart\nFuture\u003cvoid\u003e main() async {\n    WidgetsFlutterBinding.ensureInitialized();\n\n    await DittoStore().initialize(\n        configs: DittoConfigData.base(\n        projectId: '\u003cYOUR_PROJECT_ID\u003e',\n        apiKey: '\u003cYOUR_API_KEY\u003e',\n        ),\n    );\n\n    runApp(const MyApp());\n}\n\n// ...\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  @override\n  Widget build(BuildContext context) {\n    return DittoMaterialApp(\n      title: 'Ditto test',\n      fallbackLocale: const Locale('en'),\n      home: const MyHomePage(),\n    );\n  }\n}\n\n```\n\n### Integrated initialization\n\nHere you can let the `DittoMaterialApp` component handle the `DittoStore` initialization simply by giving it the `DittoConfigData`\n\n```dart\n//...\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  @override\n  Widget build(BuildContext context) {\n    return DittoMaterialApp(\n      title: 'Ditto test',\n      fallbackLocale: const Locale('en'),\n      home: const MyHomePage(),\n      configData: DittoConfigData.base(\n        projectId: '\u003cYOUR_PROJECT_ID\u003e',\n        apiKey: '\u003cYOUR_API_KEY\u003e',\n      ),\n      loadingPlaceholder: Container(\n        color: Theme.of(context).primaryColor,\n        child: const Center(\n          child: CircularProgressIndicator(color: Colors.white),\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Translations\n\nAs you wrapped your app with `DittoMaterialApp`, you can now translate your texts by using the `String.translate()` extension.\n\n```dart\n/// For a simple translation\n'simple_key'.translate()\n\n/// For a translation with a variable\n'variable_key'.translate({'var_name': 'var_value'})\n/// If you want to hide a variable, use `null`\n'variable_key'.translate({'var_name': null})\n\n/// For a translation with plurals\n'plural_key'.translate({'var_name': 'var_value'}, 2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsimone%2Fflutter-ditto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmsimone%2Fflutter-ditto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsimone%2Fflutter-ditto/lists"}