Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
7713a4c
Initial commit
dnfield Feb 28, 2022
8d9b990
add basic codec support
Mar 1, 2022
fed0aaa
Address review comments
jonahwilliams Mar 1, 2022
06ee03a
remove package:typed_data
jonahwilliams Mar 1, 2022
d6917b6
Add more tests and fix bugs
jonahwilliams Mar 1, 2022
66afbac
Merge pull request #1 from jonahwilliams/encoder_decoder
dnfield Mar 1, 2022
80857cb
add basic vector graphics asset
jonahwilliams Mar 1, 2022
87659e0
example of controller
jonahwilliams Mar 1, 2022
f179ecb
add more examples
jonahwilliams Mar 1, 2022
f2ea3d0
update paint construction
jonahwilliams Mar 1, 2022
6b0ae22
Remove equality and add more doc comments
jonahwilliams Mar 1, 2022
7b3feee
fix pubspec and CHANGELOG
jonahwilliams Mar 1, 2022
af68ea2
Add geometry classes
dnfield Mar 1, 2022
6fcce39
Update packages/vector_graphics_compiler/test/basic_types_test.dart
dnfield Mar 1, 2022
9d07f48
Update packages/vector_graphics_compiler/test/util_test.dart
dnfield Mar 1, 2022
074db46
..
dnfield Mar 1, 2022
a2e4721
merge
dnfield Mar 1, 2022
abe1c17
Merge pull request #4 from dnfield/actions
dnfield Mar 2, 2022
e438d32
doc, merge, enable tests
dnfield Mar 2, 2022
b872ed1
Format, update rules, jonah review
dnfield Mar 2, 2022
f3b5c35
Merge pull request #2 from jonahwilliams/runtime
jonahwilliams Mar 2, 2022
2dd3360
Merge pull request #3 from dnfield/geom
dnfield Mar 2, 2022
801a235
Add paint, vertices, indexed vertices, and tests
dnfield Mar 2, 2022
79036fd
fix logic, update test
dnfield Mar 2, 2022
4e529fc
nit
dnfield Mar 2, 2022
f112baf
format
dnfield Mar 2, 2022
9b6f415
Merge pull request #5 from dnfield/paint
dnfield Mar 2, 2022
5b2d732
..
dnfield Mar 3, 2022
1e01d5e
Get prsing up and running, sort of
dnfield Mar 6, 2022
c137338
remove some commented out code, add some tests
dnfield Mar 7, 2022
1d4eddd
analysis options and cleanup
dnfield Mar 7, 2022
a7d5867
bugs, tests
dnfield Mar 7, 2022
9d4d7d5
Remove unused code, add simpler test
dnfield Mar 7, 2022
bfc06f2
..
dnfield Mar 7, 2022
bb22019
Fix bug in optimizer and add tests
dnfield Mar 7, 2022
2ec3623
docs, light refactoring
dnfield Mar 7, 2022
5422149
Merge pull request #6 from dnfield/ast
dnfield Mar 7, 2022
542f437
Add some missing tests, fix bugs (#9)
dnfield Mar 7, 2022
881812b
Add support for encoding in the compiler, add basic example to packag…
jonahwilliams Mar 8, 2022
55debbd
Add support for saveLayer/restore (#10)
jonahwilliams Mar 10, 2022
cdb483f
add support for linear and radial gradient (#11)
jonahwilliams Mar 14, 2022
c70e0d7
transform shaders into correct coordinate space (#12)
jonahwilliams Mar 17, 2022
1138ecc
correctly encode Uint16Lists (#14)
jonahwilliams Mar 21, 2022
2b3368e
Small bugs (#15)
dnfield Mar 21, 2022
b5a86b8
encode viewport into codec and correctly size widget (#16)
jonahwilliams Mar 23, 2022
e1831f8
Remove assert (#18)
jonahwilliams Mar 23, 2022
b30635b
compute correct scaling (#17)
jonahwilliams Mar 23, 2022
4f08068
Support clips (#19)
dnfield Mar 23, 2022
2d6f3ee
Fix RRect parsing, make PathBuilder chainable (#20)
dnfield Mar 23, 2022
fb69efc
Support masks, refactor related code. (#25)
dnfield Mar 24, 2022
54113fe
Allow encoding transforms for radial gradient, respect user space mod…
jonahwilliams Mar 24, 2022
be4662f
Remove linear gradient tranfsorms from codec (#28)
dnfield Mar 24, 2022
78761ee
Refactor parsing, start blend mode support, improve attribute inherit…
dnfield Mar 27, 2022
b26bf0e
Fix gradient regressions, OoO support for use/gradients (#30)
dnfield Mar 28, 2022
e4f0b67
Fix missing stroke join (#32)
dnfield Mar 28, 2022
218c0f5
Do not ignore blend mode when deciding whether to save a layer (#35)
dnfield Mar 28, 2022
e8040cc
Gradient tranfsorm bounds (#36)
dnfield Mar 29, 2022
3dc2ce4
Reduce precision to save binary size (#37)
dnfield Mar 29, 2022
1e90075
Strokes can have shaders too (#38)
dnfield Mar 29, 2022
77d132a
Update tiger.bin, update example, ignore platform folders in example …
dnfield Mar 30, 2022
0297ac3
Make sure that the loadBytes method gets called when dependencies cha…
dnfield Apr 1, 2022
33ef4d6
create separate picture layer for vector graphics widget (#47)
jonahwilliams Apr 1, 2022
d190056
Tolerate missing references (#48)
dnfield Apr 1, 2022
7869abc
Add support for text (#40)
jonahwilliams Apr 1, 2022
8d9dce1
encode text transforms (#50)
dnfield Apr 4, 2022
424198b
Add Visitor API, use to implement resolution phase (#51)
jonahwilliams Apr 6, 2022
8184de9
Dashed paths (#54)
dnfield Apr 7, 2022
7cd09a9
Update path.dart (#56)
dnfield Apr 7, 2022
cbf6848
use arg parser to parse input options (#55)
jonahwilliams Apr 7, 2022
a00f990
Forward opacity and blend mode down the tree (#53)
jonahwilliams Apr 8, 2022
37d336c
Cleanup and support web (#59)
dnfield Apr 8, 2022
f67cd0b
Fix for importing (#60)
dnfield Apr 11, 2022
3e1b2c8
Licenses (#61)
dnfield Apr 11, 2022
4e97384
Add semantic properties (#62)
Apr 12, 2022
7b8a89b
Update vector_graphics_compiler.dart (#63)
dnfield Apr 12, 2022
df786bc
Fix sizing, drive by fix for visitchildren on some resolved node type…
dnfield Apr 13, 2022
1a330a5
Defer resolving paths for clips, add test for clips with use (#65)
dnfield Apr 13, 2022
2f7aea4
Wrap picture in repaint boundary (#67)
Apr 18, 2022
4b89e8c
add placeholder builder (#68)
Apr 20, 2022
696a600
Clip the fitted box if it would overflow (#69)
dnfield Apr 26, 2022
b9ae14a
Don't align float32 and encode control points and control point types…
Apr 26, 2022
6e9dce1
Update tesselator to use args and visitor (#57)
Apr 27, 2022
a9396c7
dont force extra compositing (#70)
May 5, 2022
a46477d
Filter/Opacity support and eager rasterization (#71)
May 20, 2022
f8f6d75
Super parameters are neat (#73)
dnfield May 20, 2022
8c3522a
Skip drawing anything if VECTOR_GRAPHICS_SKIP_RASTER is true in debug…
May 21, 2022
3abf286
switch to animation for opacity, update docs (#77)
May 23, 2022
1b3fdeb
correct scaling approximation and ensure raster has sufficient resolu…
May 23, 2022
5799cff
cleanups (#78)
May 24, 2022
82cb8ee
Avoid calling setState on a disposed state (#79)
dnfield May 24, 2022
9c18d04
use the same paint color as drawImage (#80)
May 24, 2022
0da866f
Handle empty dash arrays (#83)
dnfield May 27, 2022
6bdf45b
Add caching system for pictures and rasters (#87)
Jun 10, 2022
754fcad
Fix typos and create a version of the tessellator optimization that n…
Jun 16, 2022
6992b37
prevent double dispoal (#90)
Jun 17, 2022
c1e31ab
add imperative picture loader (#89)
Jun 21, 2022
99fdddb
make disposal non-fatal (#92)
Jun 21, 2022
7ce79b6
use toGPU image (#93)
Jun 30, 2022
2ca0050
Add a more interesting example, bump XML
dnfield Jul 8, 2022
31d3789
Merge remote-tracking branch 'origin/main'
dnfield Jul 8, 2022
e6cf981
Make analysis happy (#94)
dnfield Jul 8, 2022
e0bd5b8
Use toImageSync and remove tester workaround (#95)
Jul 9, 2022
28b73e5
Migrate PathOps Lib to VectorGraphics (#99)
c-h-i-a-m-a-k-a-2 Jul 19, 2022
f23a4e7
Mask optimizer (#96)
c-h-i-a-m-a-k-a-2 Jul 20, 2022
ec950ba
update to 0.0.1 (#101)
Jul 27, 2022
bb92622
Added command line option for masking optimizer, and corrected dylib …
c-h-i-a-m-a-k-a-2 Jul 27, 2022
2b40be6
Clipping Optimizer (#97)
c-h-i-a-m-a-k-a-2 Jul 27, 2022
5661d39
Removing uncessesary tesselator variables in path ops files (#103)
c-h-i-a-m-a-k-a-2 Jul 27, 2022
85ddede
Codec and runtime support for images (#102)
Jul 28, 2022
2bf9dc1
Add compiler support for base64 encoded PNG image data (#104)
Jul 28, 2022
113d8c9
Fix Transform and make encoding double (#107)
Jul 28, 2022
d36b725
Overdraw Optimizer (#105)
c-h-i-a-m-a-k-a-2 Aug 1, 2022
7003f59
add transform to image and replace transformRect implementation (#109)
Aug 1, 2022
8c4b70b
Make examples work again (#111)
dnfield Aug 2, 2022
6ba8bed
Bump path_parsing (#113)
dnfield Aug 4, 2022
8140201
Support point values (#114)
dnfield Aug 4, 2022
7275b98
make vector_graphics_compiler compile on the web again (#115)
Aug 9, 2022
72f140c
updates for publishing (#116)
Aug 10, 2022
2c9b87b
move native library tests into optimizer test suites (#118)
Aug 11, 2022
55d6f39
correctly default image width and height (#120)
Aug 17, 2022
16a1e61
<Pattern> Support (#110)
c-h-i-a-m-a-k-a-2 Aug 19, 2022
6916130
Do not draw strokes unless a stroke color, pattern, or gradient is sp…
dnfield Aug 24, 2022
b041704
Fix typos, make exception more helpful if decoding fails (#126)
dnfield Aug 25, 2022
2afe052
dispose things after using them (#127)
dnfield Aug 31, 2022
291ca05
Handle quads (#128)
dnfield Aug 31, 2022
703a9a6
Dispose vertices (#130)
dnfield Sep 6, 2022
1b142fc
Dispose paragraphs! (#131)
dnfield Sep 8, 2022
2fcc58a
Be more permissive when parsing colors (#132)
dnfield Sep 9, 2022
ddf18dc
Fix fill type for applyOp (#134)
dnfield Sep 14, 2022
d1561e2
Allow processing SVGs in parallel with Isolate.run (#135)
Sep 23, 2022
49c97ec
add a hidden debugging format --dump-debug (#136)
Sep 23, 2022
83a07ee
Avoid emitting empty paths (#137)
dnfield Sep 24, 2022
5c729eb
HTML backend compatibility (#138)
Sep 28, 2022
bcc8966
Add support for drawPicture rasterization strategy (#141)
Oct 13, 2022
e8f278c
Wire up SVG theme related properties to compiler (#142)
dnfield Oct 20, 2022
9adc819
version bumps for 0.0.3 (#143)
dnfield Oct 21, 2022
30288dd
missed
dnfield Oct 21, 2022
30547c8
Support text decorations (#146)
dnfield Oct 21, 2022
80e8d24
Support text-anchoring (#147)
dnfield Oct 22, 2022
8cd5445
Fix zero width strokes (#148)
dnfield Oct 22, 2022
dfa0ca6
Fix clip transforms (#149)
dnfield Oct 24, 2022
b65cb97
Apply transforms to more nodes, fix bugs in image transforms (#150)
dnfield Oct 25, 2022
c6b9871
fix bounds of saveLayer (#152)
Oct 27, 2022
6c59070
Remove `dead code` for uninitialized variable `definitionPaint` (#153)
asashour Nov 1, 2022
f50b98a
Make compiler safer for web (#154)
dnfield Nov 4, 2022
8d9dcb8
Allow build context to be nullable (#155)
dnfield Nov 5, 2022
9a97a13
pubspecs
dnfield Nov 5, 2022
3d7cd1b
Merge remote-tracking branch 'origin/main'
dnfield Nov 5, 2022
c5f0d44
fix pool
dnfield Nov 5, 2022
519a6c8
more...
dnfield Nov 5, 2022
88a7f7b
remove pool dependency (#157)
Nov 5, 2022
06e9cc9
Add tool to validate pubspecs (#156)
dnfield Nov 5, 2022
88036eb
All compile-time color remapping. (#160)
dnfield Nov 7, 2022
b5801cd
Add clipViewbox parameter (#161)
dnfield Nov 8, 2022
ba536d2
Images in defs (#162)
dnfield Nov 9, 2022
1152505
Scale images correctly (#163)
dnfield Nov 9, 2022
4fa00a1
Make parsing synchronous? (#164)
dnfield Nov 10, 2022
13657b2
EVEN MORE SYNC (#165)
dnfield Nov 10, 2022
1f66577
N'SYNC (#166)
dnfield Nov 12, 2022
b4dcd9c
Support golden testing (#167)
dnfield Nov 17, 2022
e727bb6
Use the ImageCache for images in the SVG (#168)
dnfield Nov 17, 2022
67a83fa
Version 1.0 bumps (#169)
dnfield Nov 18, 2022
c5e384c
Patterns work at runtime (#174)
dnfield Jan 17, 2023
7d6702e
Correct matrix operation order for unusual combination (#175)
dnfield Jan 19, 2023
1fdf4f5
changelogs
dnfield Jan 20, 2023
7db7c01
Avoid defaulting to black fill for non-shape/text content. (#176)
dnfield Jan 27, 2023
96e65c6
pub bumps
dnfield Feb 2, 2023
84a6550
Fix alpha channel parsing in hex colors (#172)
tgucio Feb 7, 2023
093956c
Respect packageName in AssetBytesLoader (#178)
xvrh Feb 9, 2023
b11e216
Fix opacity peephole with complex nested groups + clip (#179)
Feb 10, 2023
786cb48
Reintroduce clipBehavior (#180)
sabifa Feb 13, 2023
1ee57c5
Fix pattern tracking and application (#181)
dnfield Feb 13, 2023
4883e29
Fix inheritence for strokes and fills, particularly the w3 svg logo t…
dnfield Feb 18, 2023
9ed6f7d
Scale stroke width when transforms are applied (#184)
dnfield Feb 18, 2023
1aaafbb
fix opacity on default fills (#185)
dnfield Feb 18, 2023
f43051b
Missing resolution when saveLayer or viewport is involved (#186)
dnfield Feb 21, 2023
7e7e127
correctly handle opacity and blending when in a saveLayer (#187)
dnfield Feb 22, 2023
54709b8
Fix currentColor, version bumps/changelogs (#188)
dnfield Feb 22, 2023
1212fc9
Preserve stroke-opacity (#190)
dnfield Mar 1, 2023
82cd325
Fix text parsing (#189)
dnfield Mar 3, 2023
04f70aa
Version bumps
dnfield Mar 4, 2023
b64e124
Make sure that attributes are inherited down all nodes with children,…
dnfield Mar 7, 2023
72cf2b4
v1.1.2
dnfield Mar 7, 2023
8658728
Improve text whitespace handling (#192)
dnfield Mar 9, 2023
6c5b503
Fix fill rule inheritence, fix default fill application (#194)
dnfield Mar 13, 2023
6c97d26
Support more image formats, be more tolerant of badly formed MIME typ…
dnfield Mar 14, 2023
d031806
Add support for encoding control points as half precision floating po…
Apr 3, 2023
ed44dca
Migrates test to extends DefaultWidgetsLocalizations (#198)
chunhtai Apr 5, 2023
5822336
Added support for a default error widget in case of any exception. (#…
marcoedomingos Apr 10, 2023
9042f34
update changelogs
dnfield Apr 11, 2023
a0a25cd
Support whitespace in transforms (#200)
dnfield Apr 12, 2023
3080b52
Fix text positioning when transform but no x/y or dx/dy (#201)
dnfield Apr 12, 2023
29214eb
Fix assertions about image formats (#202)
dnfield Apr 24, 2023
ce0cb4a
Fix optimization bugs in mask and overdraw optimizers (#203)
dnfield Apr 27, 2023
a35d8a2
- fixed bug of Unhandled Exception: Null check operator used on a nul…
carloshpb May 15, 2023
4e716d6
Fix text position computation (#206)
dnfield May 18, 2023
5e4c73f
Support matching text direction (#207)
dnfield Jun 12, 2023
dd0ba28
Transform parser bugs (#208)
dnfield Jun 15, 2023
2873b3b
add option --out-dir to packge vector_graphics_compiler (#215)
FursanAbdulhak Sep 21, 2023
9f85305
Improve the error message every so little. (#216)
bramp Oct 10, 2023
d933650
fix analysis issues
dnfield Oct 11, 2023
2ecf14d
Avoid stack overflow when self-referential elemetns present, only use…
dnfield Oct 12, 2023
7d7e4f5
Fix parsing transforms with scientific notation (#220)
skreborn Oct 13, 2023
347e062
Scientific notation should not be case sensitive on the `e` parameter…
dnfield Jan 8, 2024
e1cbf12
Apply a clip rectangle if a color filter is used (#229)
jason-simmons Feb 5, 2024
cf8ca2a
Get Github back up to date, update versions for latest publication pr…
dnfield Feb 5, 2024
79f23b9
Save before clip (#232)
dnfield Feb 6, 2024
8d419a7
Use package http (#234)
dnfield Feb 20, 2024
cd6b96c
relax http (#235)
dnfield Feb 20, 2024
16dfc47
Merge remote-tracking branch 'vector_graphics/main' into import-vecto…
stuartmorgan-g Oct 28, 2024
a1bfadf
Update vector_graphics to match repo conventions
stuartmorgan-g Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ packages/shared_preferences/** @tarrinneal
packages/standard_message_codec/** @jonahwilliams
packages/two_dimensional_scrollables/** @Piinks
packages/url_launcher/** @stuartmorgan
packages/vector_graphics/** @jonahwilliams
packages/vector_graphics_codec/** @jonahwilliams
packages/vector_graphics_compiler/** @jonahwilliams
packages/video_player/** @tarrinneal
packages/web_benchmarks/** @yjbanov
packages/webview_flutter/** @bparrishMines
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ These are the packages hosted in this repository:
| [standard\_message\_codec](./packages/standard_message_codec/) | [![pub package](https://img.shields.io/pub/v/standard_message_codec.svg)](https://pub.dev/packages/standard_message_codec) | [![pub points](https://img.shields.io/pub/points/standard_message_codec)](https://pub.dev/packages/standard_message_codec/score) | [![popularity](https://img.shields.io/pub/popularity/standard_message_codec)](https://pub.dev/packages/standard_message_codec/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20standard_message_codec?label=)](https://github.com/flutter/flutter/labels/p%3A%20standard_message_codec) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20standard_message_codec?label=)](https://github.com/flutter/packages/labels/p%3A%20standard_message_codec) |
| [two\_dimensional\_scrollables](./packages/two_dimensional_scrollables/) | [![pub package](https://img.shields.io/pub/v/two_dimensional_scrollables.svg)](https://pub.dev/packages/two_dimensional_scrollables) | [![pub points](https://img.shields.io/pub/points/two_dimensional_scrollables)](https://pub.dev/packages/two_dimensional_scrollables/score) | [![popularity](https://img.shields.io/pub/popularity/two_dimensional_scrollables)](https://pub.dev/packages/two_dimensional_scrollables/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20two_dimensional_scrollables?label=)](https://github.com/flutter/flutter/labels/p%3A%20two_dimensional_scrollables) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20two_dimensional_scrollables?label=)](https://github.com/flutter/packages/labels/p%3A%20two_dimensional_scrollables) |
| [url\_launcher](./packages/url_launcher/) | [![pub package](https://img.shields.io/pub/v/url_launcher.svg)](https://pub.dev/packages/url_launcher) | [![pub points](https://img.shields.io/pub/points/url_launcher)](https://pub.dev/packages/url_launcher/score) | [![popularity](https://img.shields.io/pub/popularity/url_launcher)](https://pub.dev/packages/url_launcher/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20url_launcher?label=)](https://github.com/flutter/flutter/labels/p%3A%20url_launcher) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20url_launcher?label=)](https://github.com/flutter/packages/labels/p%3A%20url_launcher) |
| [vector\_graphics](./packages/vector_graphics/) | [![pub package](https://img.shields.io/pub/v/vector_graphics.svg)](https://pub.dev/packages/vector_graphics) | [![pub points](https://img.shields.io/pub/points/vector_graphics)](https://pub.dev/packages/vector_graphics/score) | [![popularity](https://img.shields.io/pub/popularity/vector_graphics)](https://pub.dev/packages/vector_graphics/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20vector_graphics?label=)](https://github.com/flutter/flutter/labels/p%3A%20vector_graphics) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20vector_graphics?label=)](https://github.com/flutter/packages/labels/p%3A%20vector_graphics) |
| [vector\_graphics\_codec](./packages/vector_graphics_codec/) | [![pub package](https://img.shields.io/pub/v/vector_graphics_codec.svg)](https://pub.dev/packages/vector_graphics_codec) | [![pub points](https://img.shields.io/pub/points/vector_graphics_codec)](https://pub.dev/packages/vector_graphics_codec/score) | [![popularity](https://img.shields.io/pub/popularity/vector_graphics_codec)](https://pub.dev/packages/vector_graphics_codec/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20vector_graphics_codec?label=)](https://github.com/flutter/flutter/labels/p%3A%20vector_graphics_codec) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20vector_graphics_codec?label=)](https://github.com/flutter/packages/labels/p%3A%20vector_graphics_codec) |
| [vector\_graphics\_compiler](./packages/vector_graphics_compiler/) | [![pub package](https://img.shields.io/pub/v/vector_graphics_compiler.svg)](https://pub.dev/packages/vector_graphics_compiler) | [![pub points](https://img.shields.io/pub/points/vector_graphics_compiler)](https://pub.dev/packages/vector_graphics_compiler/score) | [![popularity](https://img.shields.io/pub/popularity/vector_graphics_compiler)](https://pub.dev/packages/vector_graphics_compiler/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20vector_graphics_compiler?label=)](https://github.com/flutter/flutter/labels/p%3A%20vector_graphics_compiler) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20vector_graphics_compiler?label=)](https://github.com/flutter/packages/labels/p%3A%20vector_graphics_compiler) |
| [video\_player](./packages/video_player/) | [![pub package](https://img.shields.io/pub/v/video_player.svg)](https://pub.dev/packages/video_player) | [![pub points](https://img.shields.io/pub/points/video_player)](https://pub.dev/packages/video_player/score) | [![popularity](https://img.shields.io/pub/popularity/video_player)](https://pub.dev/packages/video_player/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20video_player?label=)](https://github.com/flutter/flutter/labels/p%3A%20video_player) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20video_player?label=)](https://github.com/flutter/packages/labels/p%3A%20video_player) |
| [web\_benchmarks](./packages/web_benchmarks/) | [![pub package](https://img.shields.io/pub/v/web_benchmarks.svg)](https://pub.dev/packages/web_benchmarks) | [![pub points](https://img.shields.io/pub/points/web_benchmarks)](https://pub.dev/packages/web_benchmarks/score) | [![popularity](https://img.shields.io/pub/popularity/web_benchmarks)](https://pub.dev/packages/web_benchmarks/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20web_benchmarks?label=)](https://github.com/flutter/flutter/labels/p%3A%20web_benchmarks) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20web_benchmarks?label=)](https://github.com/flutter/packages/labels/p%3A%20web_benchmarks) |
| [webview\_flutter](./packages/webview_flutter/) | [![pub package](https://img.shields.io/pub/v/webview_flutter.svg)](https://pub.dev/packages/webview_flutter) | [![pub points](https://img.shields.io/pub/points/webview_flutter)](https://pub.dev/packages/webview_flutter/score) | [![popularity](https://img.shields.io/pub/popularity/webview_flutter)](https://pub.dev/packages/webview_flutter/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20webview?label=)](https://github.com/flutter/flutter/labels/p%3A%20webview) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20webview_flutter?label=)](https://github.com/flutter/packages/labels/p%3A%20webview_flutter) |
Expand Down
10 changes: 10 additions & 0 deletions packages/vector_graphics/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: a7790d8e3a6c1810b8ce77cc9339d8b30ff68019
channel: unknown

project_type: package
6 changes: 6 additions & 0 deletions packages/vector_graphics/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Below is a list of people and organizations that have contributed
# to the Flutter project. Names should be added to the list like so:
#
# Name/Organization <email address>

Google Inc.
132 changes: 132 additions & 0 deletions packages/vector_graphics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
## 1.1.12

* Transfers the package source from https://github.com/dnfield/vector_graphics
to https://github.com/flutter/packages.

## 1.1.11+1

* Relax package:http constraint.

## 1.1.11

* Use package:http to drop dependency on dart:html.

## 1.1.10+1

* Add missing save before clip.

## 1.1.10

* Add missing clip before saveLayer.

## 1.1.9+2

* Fix case sensitivity on scientific notation parsing.

## 1.1.9+1

* Fix publication error that did not have latest source code.

## 1.1.9

* Fix handling of invalid XML `@id` attributes.
* Fix handling of self-referential `<use/>` elements.
* Add `--out-dir` option to compiler.
* Tweak warning message for unhandled eleemnts.

## 1.1.8

* Fix bugs in transform parsing.

## 1.1.7

* Support for matching the ambient text direction.

## 1.1.6

* Fix bug in text position computation when transforms are involved.

## 1.1.5+1

* Remove/update some invalid assertions related to image formats.

## 1.1.5

* Support for decoding control points as IEEE 754-2008 half precision
floating point values.
* Migrate the test to extend DefaultWidgetsLocalizations.
* Added an error builder property to provide a fallback widget on exceptions.

## 1.1.4

* Support more image formats and malformed MIME types.
* Fix inheritence for `fill-rule`s.

## 1.1.3

* Further improvements to whitespace handling for text.

## 1.1.2

* Fix handling and inheritence of `none`.

## 1.1.1

* Multiple text positioning bug fixes.
* Preserve stroke-opacity when specified.

## 1.1.0

* Fix a number of inheritence related bugs:
* Inheritence of properties specified on the root element now work.
* Opacity inheritence is more correct now.
* Inheritence of `use` elements is more correctly handled.
* Make `currentColor` non-null on SVG theme, and fix how it is applied.
* Remove the opacity peephole optimizer, which was incorrectly applying
optimizations in a few cases. A future release may add this back.
* Add clipBehavior to the widget.
* Fix patterns when multiple patterns are specified and applied within the
graphic.

## 1.0.1+1

* Fix bug in asset loading from packages.

## 1.0.1

* Fix handling of fill colors on use/group elements.

## 1.0.0+1

* Fix issue in pattern decoding.
* Fix issue in matrix parsing for some combinations of matrices.

## 1.0.0

* Stable release.
* Use `ImageCache` for images.
* Bug fixes for image rendering.
* Better support for synchronous usage in testing.
* Make clipping the viewbox optional.

## 0.0.3

* Improvements to CLI utilities.
* Dispose unused objects.
* Improved support for HTML backend.
* Less aggressive rasterization strategy for flutter_svg compatibility.

## 0.0.2

* Support for drawing images

## 0.0.1

* Added `VectorGraphic` which consumes encoded vector graphics assets using
a `BytesLoader`.
* Added `AssetBytesLoader` and `NetworkBytesLoader` as example loader
implementations.

## 0.0.0

* Create repository
25 changes: 25 additions & 0 deletions packages/vector_graphics/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright 2013 The Flutter Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 changes: 14 additions & 0 deletions packages/vector_graphics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# vector_graphics

A vector graphics rendering runtime for Flutter. This package is intended for
use with output from the `package:vector_graphics_compiler` and encoded via
a tightly coupled version of `package:vector_graphics_codec`.

## Commemoration

This package was originally authored by
[Dan Field](https://github.com/dnfield) and has been forked here
from [dnfield/vector_graphics](https://github.com/dnfield/vector_graphics).
Dan was a member of the Flutter team at Google from 2018 until his death
in 2024. Dan’s impact and contributions to Flutter were immeasurable, and we
honor his memory by continuing to publish and maintain this package.
61 changes: 61 additions & 0 deletions packages/vector_graphics/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
android/
ios/
macos/
linux/
windows/
web/
test/
android/
ios/
macos/
linux/
windows/
web/
test/
.metadata

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Web related

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
3 changes: 3 additions & 0 deletions packages/vector_graphics/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# example

An example of using package:vector_graphics to draw vector assets
Binary file not shown.
75 changes: 75 additions & 0 deletions packages/vector_graphics/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:developer';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:vector_graphics/vector_graphics.dart';
import 'package:vector_graphics_compiler/vector_graphics_compiler.dart';

void main() {
runApp(const MyApp());
}

/// The main example app widget.
class MyApp extends StatelessWidget {
/// Creates a new [MyApp].
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Vector Graphics Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const Scaffold(
body: Center(
child: VectorGraphic(
loader: NetworkSvgLoader(
'https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg',
),
),
),
),
);
}
}

/// A [BytesLoader] that converts a network URL into encoded SVG data.
class NetworkSvgLoader extends BytesLoader {
/// Creates a [NetworkSvgLoader] that loads an SVG from [url].
const NetworkSvgLoader(this.url);

/// The SVG URL.
final String url;

@override
Future<ByteData> loadBytes(BuildContext? context) async {
return compute((String svgUrl) async {
final http.Response request = await http.get(Uri.parse(svgUrl));
final TimelineTask task = TimelineTask()..start('encodeSvg');
final Uint8List compiledBytes = encodeSvg(
xml: request.body,
debugName: svgUrl,
enableClippingOptimizer: false,
enableMaskingOptimizer: false,
enableOverdrawOptimizer: false,
);
task.finish();
// sendAndExit will make sure this isn't copied.
return compiledBytes.buffer.asByteData();
}, url, debugLabel: 'Load Bytes');
}

@override
int get hashCode => url.hashCode;

@override
bool operator ==(Object other) {
return other is NetworkSvgLoader && other.url == url;
}
}
Loading