You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tooling/stacked-cli.md
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ To get started, install the `stacked_cli` package on your machine:
18
18
dart pub global activate stacked_cli
19
19
```
20
20
21
-
### Creating a App
21
+
### Creating a new App
22
22
23
23
To create your first Stacked app, all you need to do is run:
24
24
@@ -41,7 +41,7 @@ The following `arguments` are available on create app command:
41
41
| --platforms || The platforms supported by this project. Platform folders will be generated in the target project. Allowed: ios, android, windows, linux, macos, web |
42
42
| --line-length | -l | When a number is provided, it will be used as the line length for formatting code. |
43
43
44
-
### Add a New View
44
+
### Add a new View
45
45
46
46
From the root folder of your Stacked application, run the command:
47
47
@@ -62,7 +62,7 @@ The following `arguments` are available on create view command:
62
62
| --config-path | -c | Sets the file path for the custom config. |
63
63
| --line-length | -l | When a number is provided, it will be used as the line length for formatting code. |
64
64
65
-
### Add a New Service
65
+
### Add a new Service
66
66
67
67
From the root folder of your Stacked application, run the command:
68
68
@@ -82,7 +82,7 @@ The following `arguments` are available on create service command:
82
82
| --config-path | -c | Sets the file path for the custom config. |
83
83
| --line-length | -l | When a number is provided, it will be used as the line length for formatting code. |
84
84
85
-
### Add a New Bottom Sheet
85
+
### Add a new Bottom Sheet
86
86
87
87
From the root folder of your Stacked application, run the command:
88
88
@@ -103,7 +103,7 @@ The following `arguments` are available on create bottom_sheet command:
103
103
| --config-path | -c | Sets the file path for the custom config. |
104
104
| --line-length | -l | When a number is provided, it will be used as the line length for formatting code. |
105
105
106
-
### Add a New Dialog
106
+
### Add a new Dialog
107
107
108
108
From the root folder of your Stacked application, run the command:
109
109
@@ -124,6 +124,27 @@ The following `arguments` are available on create dialog command:
124
124
| --config-path | -c | Sets the file path for the custom config. |
125
125
| --line-length | -l | When a number is provided, it will be used as the line length for formatting code. |
126
126
127
+
### Add a new Widget
128
+
129
+
From the root folder of your Stacked application, run the command:
130
+
131
+
```shell
132
+
stacked create widget users_list
133
+
```
134
+
135
+
This will create a new Widget called `UsersList` with its associated WidgetModel called `UsersListModel` in the `ui/widgets/common/users_list` folder. This will also create the WidgetModel test file inside `test/widget_models/`.
136
+
137
+
The following `arguments` are available on create view command:
| --[no-]model || When model is provided, StackedView will be used instead of StatelessWidget and a Model will be created. |
143
+
| --template | -t | Selects the type of widget to create instead of the default empty widget. |
144
+
| --config-path | -c | Sets the file path for the custom config. |
145
+
| --path | -p | Sets the path for the component. |
146
+
| --line-length | -l | When a number is provided, it will be used as the line length for formatting code. |
147
+
127
148
### Generate Code
128
149
129
150
When you've changed something manually, or added a new model, instead of executing the command `flutter pub run build_runner build --delete-conflicting-outputs` you can simply run `stacked generate`.
0 commit comments