-
Notifications
You must be signed in to change notification settings - Fork 7.7k
/
Copy pathpubspec.yaml
41 lines (37 loc) · 1.44 KB
/
pubspec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: asset_transformation
description: "A new Flutter project."
publish_to: 'none'
version: 0.1.0
environment:
sdk: ^3.7.0-0
dependencies:
flutter:
sdk: flutter
vector_graphics: ^1.1.11+1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
vector_graphics_compiler: ^1.1.11+1
grayscale_transformer:
path: ./grayscale_transformer
flutter:
uses-material-design: true
assets:
# Here, we specify that assets/colorful.jpg should be transformed using
# the grayscale_transformer package. If you look at the dev_dependencies
# section, you'll notice that grayscale_transformer is a local path dependency
# and thus the full code of the package can be found right here in this project.
- path: assets/colorful.jpg
transformers:
- package: grayscale_transformer
# Here, we have an SVG image that we want to display in our app. Flutter
# cannot render SVG images itself, but there are packages that can.
# The vector_graphics package is one such app that can quickly render SVGs,
# but only after they have been run through the vector_graphics_compiler
# package first. Instead of having to do this manually ourselves, we
# can simply specify vector_graphics_compiler as a transformer on this asset.
- path: assets/svg.svg
transformers:
- package: vector_graphics_compiler
# Run the application using `flutter run` to see how these assets get rendered.