Skip to content

Commit a6d44d8

Browse files
committed
Add README
1 parent 3831f3e commit a6d44d8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,27 @@ final svg = SvgPicture.asset(Assets.images.icons.paint);
232232
final json = await rootBundle.loadString(Assets.json.fruits);
233233
```
234234

235+
[FlutterGen] also support generating other style of `Assets` class:
236+
237+
```yaml
238+
# pubspec.yaml
239+
flutter_gen:
240+
241+
assets:
242+
# Assets.imagesChip
243+
style: camel-case
244+
245+
# Assets.images_chip
246+
# style: snake-case
247+
248+
# Assets.images.chip (default style)
249+
# style: dot-delimiter
250+
251+
flutter:
252+
assets:
253+
- assets/images/chip.png
254+
```
255+
235256
The root directory will be omitted if it is either **`assets`** or **`asset`**.
236257

237258
```

0 commit comments

Comments
 (0)