{"id":19035276,"url":"https://github.com/omkarcloud/flutter-code-generator","last_synced_at":"2025-04-23T18:08:45.952Z","repository":{"id":122294673,"uuid":"286654583","full_name":"omkarcloud/flutter-code-generator","owner":"omkarcloud","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-05T06:42:55.000Z","size":3282,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T18:08:37.063Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/omkarcloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":["Chetan11-Dev"],"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":"2020-08-11T05:33:13.000Z","updated_at":"2024-08-12T20:04:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"628b8001-309c-44d4-b2a3-2bc89657889e","html_url":"https://github.com/omkarcloud/flutter-code-generator","commit_stats":null,"previous_names":["omkarcloud/flutter-code-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkarcloud%2Fflutter-code-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkarcloud%2Fflutter-code-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkarcloud%2Fflutter-code-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omkarcloud%2Fflutter-code-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omkarcloud","download_url":"https://codeload.github.com/omkarcloud/flutter-code-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487528,"owners_count":21438612,"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":[],"created_at":"2024-11-08T21:49:59.028Z","updated_at":"2025-04-23T18:08:45.934Z","avatar_url":"https://github.com/omkarcloud.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Chetan11-Dev"],"categories":[],"sub_categories":[],"readme":"![](images/demo.gif)\n\n\nA word on Architecture: \nWe bascially transform your input into data structures and output the resultant code. You could browsw the project by which you may gain thorough knowleddge of Code Generation. \nWe would gladly accept your help in improving it too!\n\n## INSTALL VSCODE EXTENSION BY VISITING https://marketplace.visualstudio.com/items?itemName=ChetanJain.flutter-code-generator\n# Examples!!!\nI am going to give you some examples that will help you.\n```\nmake cl Fruit  f !n stl\nparams     \ns name \ndy origin\n```\n![](images/b.png)\n\n```\nmake cl Fruit  f !n stl !eq !str \nmeths     \ns name \ndy origin\n```\n\n![](images/c.png)\n\n# Same as meths \n\n\n```\nmake func\n\nb sweet [s name !n , i index, d rating]\ndy origin\ni index\nd hello \n```\n![](images/d.png)\n\n\n## Hello Friend I will help you be productive Do read me after that you will be able to utilize me to full potential. Just needs your 7m.\n\nSo Hello I am an exension I have a reason to exist which is to assist you to in your tough Development job in flutter. I solves a few problems which are as follows: \n\nQ) In dart if we do something like ```print(classObjectVariable)``` it does not show us inside of a class which could we quite unhelpfull while debugging. So how to Solve it? \n\nA) So I can generate toString() method of class which will make it easier to debug. As a bounus I will generate (==) check method also.\n\n---\n\nQ) In dart I happen to create a Class and it is tedious I had to specify each variable is final and required. So how to Solve it?\n\nA) Well you make all variable in a class to be required and final. It is just the need of adding 'f r' at class Declaration( looks like ```make cl Fruit f r```)\n\n---\n\n\nQ) In flutter I happen to create a Stateful widget and sometime the state goes crazy.Hard time debugging. How about that?\n\u003c!-- Hmm It would be great if I could come to your mind and assist you in debugging but my creator has not give me that ability. But  --\u003e\nA) I can generate toString() method for parent State by which you can inspect the state.\nExample always helps. So ```make cl stf``` or ```make cl stl``` generates stateful and stateless widget with eq and toString().\n\n---\n## Guide\n\nThank you could you give me some Concrete example of how to use you?\n\nSure so I will show you an example?\n```\nmake cl Fruits   \nparams     \ns name [f !n]\nmeths \nb sweet [s name !n , i index, d rating]\ndy origin\n```\nI know the unknows Character looks unfamiliar but they dont worry I will guide you.\n\n# Explanations\n## Class Options\n```make cl Fruit```\n\nIt means I want to make a Class Fruit you can add default options after ClassName (Fruits in our case) as follows:\n    \n    r !r: Required And Not Required\n    n !n: Named And Not Named\n    f !f: Final And Not Final\n    eq !eq: Equals And Not Equals\n    str !str: toString And Not toString\n    stf stl: Statefull and Stateless\n\nSo do create Stateful widget with all field parameters final and required class Declaration looks like ``` make cl Fruit f r stf ``` \n\n---\n# Params Declarations\n\n```params```\n\nUsed to specify that params are going to follow. NOTE DO NOT ADD CLASS OPTIONS HERE OTHERWISE NO RESULT BE PRODUCED.\nParam Fields\n\n```s name [f !n]```\n\n    's' means String\n\n    'name' means variable names \n\n    '[f !n]' mean we are overriding Class Default options by    providing our own options supports\n\n    r !r: Required And Not Required\n\n    n !n: Named And Not Named\n\n    f !f: Final And Not Final\n\n# Meths Declarations\n\n```meths```\n\nUsed to specify that methods are going to follow. NOTE DO NOT ADD CLASS OPTIONS HERE OTHERWISE NO RESULT BE PRODUCED AND CLASS OPTIONS DO NOT AFFECT METHOD IN ANY WAY.\n\n```b sweet [s name !n , i index, d rating]```\n\nHere \n    \n    b means bool\n\n    'sweet' means method name \n\n    '[f !n]' mean we are overriding Class Default options by    providing our own options supports\n\n    '[s name !n , i index, d rating]'\n\n    's name !n'\n    's' means String\n    'name' is variableName\n    '!n' mean it is not named\n    ---\n    'i index'\n    'i' means int\n    'index' is variableName\n    ---\n    'd rating'\n    'd' means double\n    'rating' is variableName\n    ---\n\n```dy origin```\ngives a method with name origin that returns dynamic\n\n# Types Mapping\nHere is a map of types and their Mapping\n\n    s: 'String',\n    i: 'int',\n    b: 'bool',\n    d: 'double',\n    dy: 'dynamic',\n    ls: 'List\u003cdynamic\u003e'\n\n\n# **Have a Happy Day Ahead!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomkarcloud%2Fflutter-code-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomkarcloud%2Fflutter-code-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomkarcloud%2Fflutter-code-generator/lists"}