Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8486721

Browse files
chore(readme): update README.md
1 parent e8348c3 commit 8486721

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

‎README.md‎

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,50 @@ class CreatePostRequest {
148148
│ │ ├── sample_response.dart
149149
```
150150

151+
## ⚙️ Configuration Options
152+
153+
You can customize how the extension generates your Dart models via the **VS Code settings UI** by searching for `Neuma API Flutter`. Below are the available options:
154+
155+
### 🔧 General Settings
156+
157+
| Setting | Description | Default |
158+
| --------------------- | ----------------------------------------------------------------------------------- | ----------------- |
159+
| `Add Part Statement` | Adds `part 'file.g.dart';` for code generation compatibility. | `false` |
160+
| `Default Base Folder` | Base path where models will be generated. | `lib/data/models` |
161+
| `Field Case` | Controls naming style of fields. Options: `camelCase`, `snake_case`, or `original`. | `camelCase` |
162+
163+
### 🧱 Model Structure
164+
165+
| Setting | Description | Default |
166+
| -------------------------- | ---------------------------------------------------------------------- | ------- |
167+
| `Generate Copy With` | Adds a `copyWith()` method to generated classes. | `false` |
168+
| `Generate Equatable` | Extends `Equatable` for value equality (requires `equatable` package). | `false` |
169+
| `Generate JSON Annotation` | Adds `@JsonKey()` decorators (requires `json_annotation`). | `false` |
170+
| `Generate Subfolders` | Organizes output into subfolders per class name. | `true` |
171+
| `Generate To String` | Adds a `toString()` override. | `false` |
172+
173+
### 🛡️ Safety & Advanced
174+
175+
| Setting | Description | Default |
176+
| ------------- | ----------------------------------------------------------- | ---------- |
177+
| `Null Safety` | Handles nullability: `nullable`, `non-nullable`, or `auto`. | `auto` |
178+
| `Use Freezed` | Uses the `freezed` package instead of regular classes. | `false` |
179+
180+
181+
Or add it directly in your `settings.json`:
182+
183+
```json
184+
{
185+
"neuma-api-flutter.defaultBaseFolder": "lib/data/models",
186+
"neuma-api-flutter.fieldCase": "camelCase",
187+
"neuma-api-flutter.generateCopyWith": true,
188+
...
189+
}
190+
```
191+
151192
## 🛠️ Future Plans
152-
* Custom generation folder location
153-
* Optional settings for ```copyWith(), Equatable, Freezed```, etc
193+
* Custom generation folder location
194+
* Optional settings for ```copyWith(), Equatable, Freezed```, etc
154195
* ⏳ Convert from Postman or Swagger JSON collection
155196

156197
## 📄 License

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /