{"id":13554913,"url":"https://github.com/gmlewis/flutter-stylizer","last_synced_at":"2026-01-15T02:33:04.538Z","repository":{"id":38272147,"uuid":"156214221","full_name":"gmlewis/flutter-stylizer","owner":"gmlewis","description":"Flutter Stylizer is a VSCode extension that organizes your Flutter classes and mixins in an opinionated and consistent manner.","archived":true,"fork":false,"pushed_at":"2022-12-04T18:09:56.000Z","size":3087,"stargazers_count":24,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T02:33:48.276Z","etag":null,"topics":["class","dart","flutter","stylizer"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=gmlewis-vscode.flutter-stylizer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmlewis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["gmlewis"]}},"created_at":"2018-11-05T12:26:38.000Z","updated_at":"2025-08-25T07:45:07.000Z","dependencies_parsed_at":"2022-07-18T02:17:00.906Z","dependency_job_id":null,"html_url":"https://github.com/gmlewis/flutter-stylizer","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/gmlewis/flutter-stylizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fflutter-stylizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fflutter-stylizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fflutter-stylizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fflutter-stylizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmlewis","download_url":"https://codeload.github.com/gmlewis/flutter-stylizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fflutter-stylizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":["class","dart","flutter","stylizer"],"created_at":"2024-08-01T12:02:57.501Z","updated_at":"2026-01-15T02:33:04.512Z","avatar_url":"https://github.com/gmlewis.png","language":"TypeScript","funding_links":["https://github.com/sponsors/gmlewis"],"categories":["TypeScript"],"sub_categories":[],"readme":"# flutter-stylizer - Mothballed/Archived Plugin\n\n[![CodeQL](https://github.com/gmlewis/flutter-stylizer/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/gmlewis/flutter-stylizer/actions/workflows/codeql-analysis.yml)\n\nFlutter Stylizer is a VSCode extension that organizes your Flutter classes\nin an opinionated and consistent manner.\n\nNote that as of release `0.1.1`, there is now a standalone version of\n`flutter-stylizer` (with identical output to this plugin) that is available here:\n- https://github.com/gmlewis/go-flutter-stylizer\n\n## Status\n\nAfter 5 years, 119K installs, 4.9/5 stars, and zero sponsors, this project\nis now mothballed and archived. Feel free to fork the project to create your\nown version of the plugin and add your own customizations to your liking.\n\n## Features\n\nFlutter Stylizer organizes the class(es) within a `*.dart` file\nin the following manner (with a blank line separating these parts):\n\n* The main (possibly factory) constructor is listed first, if it exists.\n  - (`public-constructor` in configuration)\n* Any named constructors are listed next, in sorted order.\n  - (`named-constructors` in configuration)\n* Any static (class) variables are listed next, in sorted order.\n  - (`public-static-variables` in configuration)\n* Any instance variables are listed next, in sorted order.\n  (As of version `v0.1.8`, a new option flag affects this section; see below.)\n  - (`public-instance-variables` in configuration)\n* Any `@override` variables are listed next, in sorted order.\n  - (`public-override-variables` in configuration)\n* Any private static (class) variables are listed next, in sorted order.\n  - (`private-static-variables` in configuration)\n* Any private instance variables are listed next, in sorted order.\n  - (`private-instance-variables` in configuration)\n* Any `@override` methods are listed next, in sorted order.\n  - (`public-override-methods` in configuration)\n* Any other methods are listed next in their original (unchanged) order.\n  (As of version `v0.0.19`, two new option flags affect this section; see below.)\n  - (`public-other-methods` in configuration)\n* If `private-other-methods` is (optionally) specified, these will be sorted\n  separately from `public-other-methods`.\n* The `build` method is listed last.\n  - (`build-method` in configuration)\n\nI have found that developer productivity increases when all code in\nlarge projects follows a consistent and opinionated style.\n\nAdditionally, bringing new developers into a team with a large code base\nis easier when the code is consistently written and therefore easier\nto navigate and understand.\n\nWithout tooling to enforce a consistent style, developing code is less fun.\nHaving an automated tool to do this ugly work for you, however, makes\ncoding a lot more enjoyable, as you don't have to worry about the rules,\nbut can just run the plugin on file save, and the rules are automatically\nenforced. Note that this plugin doesn't natively support format-on-save,\nbut you could use another extension... possibly something like this:\nhttps://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave\nor you could use the stand-alone [Go flutter-stylizer]\nin your GitHub Actions or CI pipeline to perform this action for you.\n\n## Configuration\n\nTo override the default order of the stylizer, add a section to your\nVSCode User Preferences (`Control/Cmd-,`) like this:\n\n```\n  \"flutterStylizer\": {\n    \"groupAndSortGetterMethods\": false,\n    \"groupAndSortVariableTypes\": false,\n    \"memberOrdering\": [\n      \"public-constructor\",\n      \"named-constructors\",\n      \"public-static-variables\",\n      \"public-instance-variables\",\n      \"public-override-variables\",\n      \"private-static-variables\",\n      \"private-instance-variables\",\n      \"public-override-methods\",\n      \"public-other-methods\",\n      \"private-other-methods\",\n      \"build-method\",\n    ],\n    \"processEnumsLikeClasses\": false,\n    \"sortClassesWithinFile\": false,\n    \"sortOtherMethods\": false,\n  }\n```\n\nAnd then rearrange member names as desired.\n\n### Other option flags\n\nNote that as of `v0.0.19`, two new option flags were added to modify the\nbehavior of the \"public-other-methods\" as requested in #18:\n\n- `groupAndSortGetterMethods` (default: `false`)\n  - Whether to group getters separately (before 'public-other-methods')\n    and sort them within their group.\n\n- `sortOtherMethods` (default: `false`)\n  - Whether to sort the 'public-other-methods' within their group.\n\nAs of `v0.1.5`, a new `private-other-methods` field was added.\nIf not specified, private methods will continue to be grouped within\nthe `public-other-methods` section.\n\nAs of `v0.1.8`, a new option flag was added:\n\n- `groupAndSortVariableTypes` (default: `false`)\n  - Whether to group public variables separately by type and sort\n    them within their groups. Types are: \"final\", \"optional\" (`?`), and \"normal\".\n\nAs of `v0.1.12`, a new option flag was added:\n\n- `sortClassesWithinFile` (default: `false`)\n  - Whether to sort multiple classes within each file.\n\nAs of `v0.1.15`, a new option flag was added:\n- `processEnumsLikeClasses` (default: `false`)\n  - Whether to process enums identically to how classes are processed.\n\nThese features are experimental and should be used with caution.\nPlease file any bugs you find on the [GitHub issue tracker].\n\n## Run Flutter Stylizer on all files - Option 1\n\nIf you want a super-fast way to process all files in a very large project,\nand aren't averse to the command-line terminal (:smile:) please remember\nto check out the stand-alone command-line companion tool:\nhttps://github.com/gmlewis/go-flutter-stylizer\n\n## Run Flutter Stylizer on all files - Option 2\n\nIf you install the [Command on All Files](https://marketplace.visualstudio.com/items?itemName=rioj7.commandOnAllFiles)\nVSCode extension, you can then run the Flutter Stylizer on all files\nwithin your project.\n\nTo do so, edit your VSCode `settings.json` file and add this section:\n\n```json\n\"commandOnAllFiles.commands\": {\n    \"Format File\": {\n        \"command\": \"editor.action.formatDocument\",\n        \"includeFileExtensions\": [\n            \".dart\"\n        ]\n    },\n    \"Flutter Stylizer\": {\n        \"command\": \"extension.flutterStylizer\",\n        \"includeFileExtensions\": [\n            \".dart\"\n        ]\n    }\n}\n```\n\nThen run the command \"Flutter Stylizer\" and all `.dart` files in your project\nwill be stylized.\n\nNote that this command can take upwards of 20 seconds just to get going due\nto the time it takes to scan your project for `.dart` files.\n\nMany thanks to `@longtimedeveloper` for this\n[recommendation](https://github.com/gmlewis/flutter-stylizer/issues/23#issuecomment-1014781798)!\n\n## Limitations\n\nThis plugin does not have a full-featured Dart syntax tree parser.\nAs a result, it may come across Dart code that it doesn't handle properly.\nSee the [Known Issues](#known-issues) section below for more details.\n\n## Reporting Problems\n\nIt is my goal to be able to use this plugin on large group projects, so\nevery attempt has been made to make this robust. If, however, problems\nare found, please raise issues on the [GitHub issue tracker] for this repo\nalong with a (short) example demonstrating the \"before\" and \"after\" results\nof running this plugin on the example code.\n\nEven better, please submit a PR with your new \"before\"/\"after\" example coded-up\nas a unit test along with the code to fix the problem, and I'll try to\nincorporate the fix into the plugin.\n\n***Please remember to state which version of the plugin you are using and include your configuration settings!***\n\n[GitHub issue tracker]: https://github.com/gmlewis/flutter-stylizer/issues\n[Go flutter-stylizer]: https://github.com/gmlewis/go-flutter-stylizer\n\n## Known Issues\n\n* Flutter Stylizer is line-oriented. It is meant to be run on code that\n  is nicely separated by lines.  The `dartfmt` tool typically makes\n  sane-looking code, and this is the type of code that is being targeted\n  by this extension.\n* Code that follows the end of a multiline comment on the same\n  line is not supported. Unusual code like this will most likely not ever be\n  supported even though the Dart compiler can handle it.\n\n## Release Notes\n\n### v0.1.16\n\n- Fix [issue #31](https://github.com/gmlewis/flutter-stylizer/issues/31) for private vars.\n\n### v0.1.15\n\n- Add new option:\n  - `processEnumsLikeClasses` (default: `false`)\n\n### v0.1.14\n\n- Fix sort order of class names when `sortClassesWithinFile: true`.\n\n### v0.1.13\n\n- Fix [issue #8](https://github.com/gmlewis/go-flutter-stylizer/issues/8).\n\n### v0.1.12\n\n- Add new option [issue #8](https://github.com/gmlewis/go-flutter-stylizer/issues/8):\n  - `sortClassesWithinFile` (default: `false`)\n\n### v0.1.11\n\n- Fix [issue #6](https://github.com/gmlewis/go-flutter-stylizer/issues/6).\n\n### v0.1.10\n\n- Update vsce version.\n\n### v0.1.9\n\n- Add sponsorship ability.\n\n### v0.1.8\n\n- Add new option [issue #31](https://github.com/gmlewis/flutter-stylizer/issues/31):\n  - `groupAndSortVariableTypes` (default: `false`)\n\n### v0.1.7\n\n- Fix [issue #26](https://github.com/gmlewis/flutter-stylizer/issues/26) caused by `Function()`.\n\n### 0.1.6\n\n- Process all `mixin` blocks in addition to all `class` blocks.\n\n### 0.1.5\n\n- `private-other-methods` can optionally be added to the member ordering.\n\n### 0.1.3\n\n- Add plugin icon image.\n\n### 0.1.2\n\n- Update dependencies.\n\n### 0.1.1\n\n- Complete rewrite of Dart parser to identically match output from\n  standalone [Go flutter-stylizer](https://github.com/gmlewis/go-flutter-stylizer).\n  This VSCode plugin can now be used in the same CI/CD projects with\n  the standalone `flutter-stylizer`.\n\n### 0.0.21\n\n- Fix incorrectly identified NamedConstructor bug reported in #20.\n\n### 0.0.20\n\n- Fix plugin broken on Windows bug reported in #19.\n\n### 0.0.19\n\n- Add two new configuration booleans for experimental features,\n  requested in #18. Please use these features with caution and\n  file any bugs you find on GitHub.\n  - `groupAndSortGetterMethods` (default: `false`)\n  - `sortOtherMethods` (default: `false`)\n\n### 0.0.18\n\n- Fix incorrectly-identified Function-type variable reported in #17.\n\n### 0.0.17\n\n- Breaking change:\n  Add `\"public-override-variables\"` configuration property to allow\n  customization of `@override` variables ordering, requested in #16.\n  You will need to add this new property to your `flutterStylizer.memberOrdering`,\n  otherwise it will use the default built-in ordering.\n\n### 0.0.16\n\n- Add `flutterStylizer.memberOrdering` configuration property to allow\n  customization of member ordering, requested in #11.\n\n### 0.0.15\n\n- Fix incorrectly-identified named constructor reported in #9.\n\n### 0.0.14\n\n- Upgrade lodash to fix security vulnerability in #8.\n\n### 0.0.13\n\n- Adds a statusbar button (on the lower left) to run the stylizer command on the current file.\n  The button appears whenever an editor with the language type `dart` is the active editor.\n  This is accomplished with a language-based \"activation event\" for \"flutter-stylizer\".\n- Adds an extension dependency to the Dart extension (this adds `dart` as an editor language).\n- This feature was generously added by @sketchbuch in #7.\n\n### 0.0.12\n\n- Incorporate vulnerability fixes from #3, #4, and #5.\n\n### 0.0.11\n\n- Fix bugs running on flutter package.\n\n### 0.0.10\n\n- Fix await bug.\n\n### 0.0.9\n\n- npm update vscode.\n\n### 0.0.8\n\n- Improve spacing for single-line variables.\n\n### 0.0.7\n\n- Fix instance variable bug.\n\n### 0.0.6\n\n- Keep groups of comments associated with following entity.\n\n### 0.0.5\n\n- Fix bugs found with abstract classes, getters, and @overrides.\n\n### 0.0.4\n\n- Add support for missing getters.\n\n### 0.0.3\n\n- Fix placement of getters with other methods.\n\n### 0.0.2\n\n- Preserve solitary single- and multi-line comments.\n\n### 0.0.1\n\n- Initial release, \"Flutter Stylizer\" is the provided command.\n\n-----------------------------------------------------------------------------------------------------------\n\n**Enjoy!**\n\n----------------------------------------------------------------------\n\n# License\n\nCopyright 2018 Glenn M. Lewis. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmlewis%2Fflutter-stylizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmlewis%2Fflutter-stylizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmlewis%2Fflutter-stylizer/lists"}