dev
sh 20 lines 611 Bytes
Raw
1 #!/usr/bin/env bash
2
3 # .svg -> .svg.vec
4 # to add images to the app, put .svgs in res/pictures then run this.
5 # compiled .svg.vec will be added to assets/new-ui
6 # CakeImageWidget automatically takes care of loading the compiled .vec file
7 # if for whatever reason you don't wanna use it, do SvgPicture(AssetBytesLoader("assets/new-ui/something.svg.vec"))
8
9 src="res/pictures"
10 dst="assets/new-ui"
11
12 while read -r dir; do
13 rel="${dir#"$src"}"
14 outdir="$dst$rel"
15
16 mkdir -p "$outdir"
17 dart run vector_graphics_compiler --input-dir "$dir" --out-dir "$outdir" >/dev/null &
18 done < <(find "$src" -type d)
19
20 wait