You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
samples/asset_transformation/pubspec.yaml

42 lines
1.4 KiB

name: asset_transformation
description: "A new Flutter project."
publish_to: 'none'
version: 0.1.0
environment:
sdk: ^3.4.0-0
dependencies:
flutter:
sdk: flutter
vector_graphics: ^1.1.11+1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.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.