{"id":16731262,"url":"https://github.com/rohit-chouhan/devi","last_synced_at":"2025-04-10T11:13:42.187Z","repository":{"id":61973116,"uuid":"401597026","full_name":"rohit-chouhan/devi","owner":"rohit-chouhan","description":"A flutter framework for storage, navigator, validate manager, we made flutter easy and fast.","archived":false,"fork":false,"pushed_at":"2024-07-24T15:19:29.000Z","size":23217,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T08:36:03.062Z","etag":null,"topics":["android","flutter","framework","ios","ui","ux"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/devi","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/rohit-chouhan.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}},"created_at":"2021-08-31T06:28:17.000Z","updated_at":"2024-07-24T15:19:33.000Z","dependencies_parsed_at":"2024-07-24T17:53:23.383Z","dependency_job_id":null,"html_url":"https://github.com/rohit-chouhan/devi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit-chouhan%2Fdevi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit-chouhan%2Fdevi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit-chouhan%2Fdevi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohit-chouhan%2Fdevi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohit-chouhan","download_url":"https://codeload.github.com/rohit-chouhan/devi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208568,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android","flutter","framework","ios","ui","ux"],"created_at":"2024-10-12T23:36:26.877Z","updated_at":"2025-04-10T11:13:42.171Z","avatar_url":"https://github.com/rohit-chouhan.png","language":"Dart","funding_links":["https://github.com/sponsors/rohit-chouhan)_"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/rohit-chouhan/devi/blob/main/devi_header.png?raw=true\"/\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003eA flutter framework for storage, navigator, validate manager, we made flutter easy and fast.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/rohit-chouhan/devi/blob/main/devi.png?raw=true\"/\u003e\u003c/p\u003e\n\n[![GitHub](https://img.shields.io/badge/Rohit_Chouhan-GitHub-black?logo=github)](https://www.github.com/rohit-chouhan)\n_[![Sponsor](https://img.shields.io/badge/Sponsor-Become_A_Sponsor-blue?logo=githubsponsors)](https://github.com/sponsors/rohit-chouhan)_\n\n## Table of content\n- [About Devi](#about-devi)\n- [Object creating](#object-creating)\n- [Route Management](#route-management)\n- [Disk Storage](#disk-storage)\n  * [Write a storage](#write-a-storage)\n  * [Read a storage](#read-a-storage)\n  * [Checking a storage](#checking-a-storage)\n  * [Remove a storage](#remove-a-storage)\n  * [Get all storage as JSON](#get-all-storage-as-json)\n  * [Clear all varibale](#clear-all-varibale)\n- [Snackbar and Alert](#snackbar-and-alert)\n  * [SnackBar or Toast](#snackbar-or-toast)\n  * [Dialogbox or Alert](#dialogbox-or-alert)\n- [Copy to clipboard](#copy-to-clipboard)\n- [Validator](#validator)\n\n## About Devi\n\nDevi is a fast and light framework for flutter to make work easy, its make management fast. Devi has very easy code and clean code to understand for beginner and all. Its allow to management for route, disk storage, alerts and validation.\n\n## Object creating\nBefore using user have to intilize object for class DEVI.\n```dart\nDevi devi = new Devi();\n```\nWhen want to use disk storage.\n```dart\nDevi box1 = new Devi('box1');\nDevi box2 = new Devi('box2');\n```\n\n## Route Management\nIf you want to navigate to another screen, so here we use the route management to jump to another screen.\n```dart\ndevi.route(context,MyApp()); \n```\nIt will create route to screen MyApp.\nFor going back from current screen to previous screen, here we use back() method\n```dart\ndevi.back(); \n```\nIt will route to you previous screen.\n\n## Disk Storage\nDisk storage is use to create disk variable as cache in your application. which is permanently created in system till formating device. Its very light to use and based on JSON.\n\n### Write a storage\nTo write or creating new storage variable here we use method put()\n```dart\nDevi devi = new Devi('box1'); //box1 is parent storage name\n\ndevi.put('name','Rohit');\n```\nIt will write Rohit as key `name` in `box1`, and store to the disk.\n\n### Read a storage\nFor reading a existing disk storage we use get() method\n```dart\ndevi.get('name');\n```\nIt will return value of key `name`.\n\n### Checking a storage\nFor checking is variable is available or not in disk.\n```dart\ndevi.isHas('name'); //will return true or false\n```\nAnother example\n```dart\nif(devi.isHas('name') == true){\n  print('Yes, key is found');\n} else {\n  print('No, key not found');\n}\n```\n### Remove a storage\nFor clear specific key from storage we use remove() method\n```dart\ndevi.remove('name');\n```\nIt will remove name key from storage.\n\n### Get all storage as JSON\nFor getting all stored value from box, here we use getJson() method\n```dart\nDevi devi = new Devi('box1');\ndevi.put('name','Rohit');\ndevi.put('county','India');\n\ndevi.getJson();\n```\nwill return\n```json\n{\n  \"name\":\"Rohit\",\n  \"country\":\"India\"\n}\n```\n\n### Clear all varibale \nFor clearing all disk variable here we use clean method.\n```dart\ndevi.clean();\n```\n\n## Snackbar and Alert\nSnackbar and alert is use to create a pop information in application.\n\n### SnackBar or Toast\nfor creating snackbar on application here we have method toast()\n```dart\ndevi.toast(context,\n  title: \"Hello, I am SnackBar\",\n  buttonLabel: \"Ok\", \n  onPressed: () {\n    print(\"SnackBar Clicked!\");\n});\n ```\n for applying theme on snackbar we use theme properties\n ```dart\ndevi.toast(context,\n  theme: Colors.red, //background color\n  buttonTheme: Colors.white, //button color\n  title: \"Hello, I am SnackBar\",\n  buttonLabel: \"Ok\",\n    onPressed: () {\n      print(\"SnackBar Clicked!\"); \n});\n  ```\n  ### Dialogbox or Alert\n  To show pop up dialogbox here we use alert() method\n  ```dart\ndevi.alert(context,\n  title: \"Heading\",\n  description: \"This is Alert Box\",\n  actions: [\n    TextButton(onPressed: () =\u003e Navigator.of(context).pop(), child: Text(\"Ok\"))\n]);\n  ```\n  \n## Copy to clipboard\nWhen you want to copy and text in clipboard here we use copy() method\n```dart\nString text = \"Hello, I am devi!\";\ndevi.copy(text);\ndevi.paste(); // will return copied txt\n```\nIt will copy text to your system clipboard.\n\n\n## Validator\nThere is some string validator to validate email, strong password etc.\n```dart\nString email = \"abc@gmail.com\";\nif(devi.isEmail(email) == true){\n  print(\"Email is valid\");\n} else {\n  print(\"Email is not valid\");\n}\n\nString password = \"Qwerty@123\";\nif(devi.isPassword(password) == true){\n  print(\"Password is strong\");\n} else {\n  print(\"Password is weak\");\n}\n\n\nString website = \"http://google.com\";\nif(devi.isUrl(website) == true){\n  print(\"URL is strong\");\n} else {\n  print(\"URL is weak\");\n}\n```\n\n## Example\n\n👉 For a complete example, refer to the [Devi package documentation](https://pub.dev/packages/devi/example).\n\n## Report bugs or issues\n\nYou are welcome to open a _[ticket](https://github.com/rohit-chouhan/devi/issues)_ on github if any 🐞 problems arise. New ideas are always welcome.\n\n\u003e Copyright © 2024 **[Rohit Chouhan](https://rohitchouhan.com)**. Licensed under the _[MIT LICENSE](https://github.com/rohit-chouhan/devi/blob/main/LICENSE)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohit-chouhan%2Fdevi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohit-chouhan%2Fdevi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohit-chouhan%2Fdevi/lists"}