{"id":21451172,"url":"https://github.com/lenra-io/client-lib-flutter","last_synced_at":"2026-04-18T13:35:13.414Z","repository":{"id":189165199,"uuid":"676206401","full_name":"lenra-io/client-lib-flutter","owner":"lenra-io","description":"A lib to let you create your Flutter application with Lenra backend","archived":false,"fork":false,"pushed_at":"2025-02-05T17:36:00.000Z","size":352,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-17T02:44:35.628Z","etag":null,"topics":["client","dart","flutter","lenra","lib"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lenra-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"github":["lenra-io"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-08-08T17:04:18.000Z","updated_at":"2025-02-05T17:35:01.000Z","dependencies_parsed_at":"2023-08-18T15:43:18.839Z","dependency_job_id":"f84ecd81-36c3-45c4-9f79-b95643a85991","html_url":"https://github.com/lenra-io/client-lib-flutter","commit_stats":null,"previous_names":["lenra-io/client-lib-flutter"],"tags_count":21,"template":false,"template_full_name":"lenra-io/template-javascript","purl":"pkg:github/lenra-io/client-lib-flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fclient-lib-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fclient-lib-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fclient-lib-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fclient-lib-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenra-io","download_url":"https://codeload.github.com/lenra-io/client-lib-flutter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fclient-lib-flutter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["client","dart","flutter","lenra","lib"],"created_at":"2024-11-23T04:18:29.884Z","updated_at":"2026-04-18T13:35:13.397Z","avatar_url":"https://github.com/lenra-io.png","language":"Dart","funding_links":["https://github.com/sponsors/lenra-io"],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003c!--\n*** This README was created with https://github.com/othneildrew/Best-README-Template\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003ch3 align=\"center\"\u003eLenra's Flutter client lib\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Let you create your Flutter application with Lenra backend.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/lenra-io/client-lib-flutter/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/lenra-io/client-lib-flutter/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Prerequisites\n\nAdd the dependency to your project:\n\n```console\nflutter pub add lenra_client\n```\n\nYou might need some other prerequisites since this lib is still in using [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage).\nLook at this lib documentation to see what you need.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nAdd a `LenraApplication` to your app:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:lenra_client/widgets.dart';\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  // This widget is the root of your application.\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Flutter Demo',\n      theme: ThemeData(\n        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),\n        useMaterial3: true,\n      ),\n      home: LenraApplication(\n        // set your own client id for production\n        clientId: 'XXX-XXX-XXX',\n        child: const MyHomePage(title: 'Flutter Demo Home Page'),\n      ),\n    );\n  }\n}\n```\n\nThis while automatically start the authentication flow.\n\nYou can then add `LenraView` instances to your widget tree to link the widget to a Lenra view and use it data:\n\n```dart\nclass MyHomePage extends StatelessWidget {\n  const MyHomePage({super.key, required this.title});\n\n  final String title;\n\n  @override\n  Widget build(BuildContext context) {\n    return LenraView(\n      route: \"/counter/me\",\n      builder: (\n        BuildContext context,\n        Map\u003cString, dynamic\u003e json,\n        ListenerCaller callListener,\n      ) =\u003e\n          Scaffold(\n        appBar: AppBar(\n          backgroundColor: Theme.of(context).colorScheme.inversePrimary,\n          title: Text(title),\n        ),\n        body: Center(\n          child: Column(\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: \u003cWidget\u003e[\n              const Text(\n                'You have pushed the button this many times:',\n              ),\n              Text(\n                '${json[\"value\"]}',\n                style: Theme.of(context).textTheme.headlineMedium,\n              ),\n            ],\n          ),\n        ),\n        floatingActionButton: FloatingActionButton(\n          onPressed: () =\u003e callListener(json[\"onIncrement\"]),\n          tooltip: 'Increment',\n          child: const Icon(Icons.add),\n        ), // This trailing comma makes auto-formatting nicer for build methods.\n      ),\n      loader: const CircularProgressIndicator(),\n    );\n  }\n}\n```\n\nFor the web target, you also have to add the following JavaScript to a redirect file (default to `redirect.html`) to handle OAuth2 redirection (see the [example](./example/web/redirect.html)):\n\n```javascript\nwindow.onload = function() {\n  window.opener.postMessage(window.location.href, `${window.location.protocol}//${window.location.host}`);\n}\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please open an issue with the tag \"enhancement\".\nDon't forget to give the project a star if you liked it! Thanks again!\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the **MIT** License. See [LICENSE](./LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nLenra - [@lenra_dev](https://twitter.com/lenra_dev) - contact@lenra.io\n\nProject Link: [https://github.com/lenra-io/client-lib-flutter](https://github.com/lenra-io/client-lib-flutter)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/lenra-io/client-lib-flutter.svg?style=for-the-badge\n[contributors-url]: https://github.com/lenra-io/client-lib-flutter/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/lenra-io/client-lib-flutter.svg?style=for-the-badge\n[forks-url]: https://github.com/lenra-io/client-lib-flutter/network/members\n[stars-shield]: https://img.shields.io/github/stars/lenra-io/client-lib-flutter.svg?style=for-the-badge\n[stars-url]: https://github.com/lenra-io/client-lib-flutter/stargazers\n[issues-shield]: https://img.shields.io/github/issues/lenra-io/client-lib-flutter.svg?style=for-the-badge\n[issues-url]: https://github.com/lenra-io/client-lib-flutter/issues\n[license-shield]: https://img.shields.io/github/license/lenra-io/client-lib-flutter.svg?style=for-the-badge\n[license-url]: https://github.com/lenra-io/client-lib-flutter/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fclient-lib-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenra-io%2Fclient-lib-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fclient-lib-flutter/lists"}