Skip to content

Commit 92238bf

Browse files
[vector_graphics] Initial import (#7941)
Imports https://github.com/dnfield/vector_graphics into this repository, with history, and updates it to follow repository conventions: - Adds missing licence headers. - Removes analysis options and fixes resulting warnings. - Updates min SDKs. - Autoformats. - Updates pubspecs to follow repo standard, including updating the metadata to point to the Flutter repositories. - Allows `xml` as a pinned dependency, and relaxes the pinning requirement in the repo tools to allow an explicit, inclusive-endpoint range. - Skips some unit tests on unsupported platforms. - Adds repo metadata. - Bumps versions and slightly relax version constraints to allow the new versions.
2 parents ed7ee79 + a1bfadf commit 92238bf

File tree

111 files changed

+33382
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+33382
-2
lines changed

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ packages/shared_preferences/** @tarrinneal
4040
packages/standard_message_codec/** @jonahwilliams
4141
packages/two_dimensional_scrollables/** @Piinks
4242
packages/url_launcher/** @stuartmorgan
43+
packages/vector_graphics/** @jonahwilliams
44+
packages/vector_graphics_codec/** @jonahwilliams
45+
packages/vector_graphics_compiler/** @jonahwilliams
4346
packages/video_player/** @tarrinneal
4447
packages/web_benchmarks/** @yjbanov
4548
packages/webview_flutter/** @bparrishMines

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ These are the packages hosted in this repository:
7575
| [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) |
7676
| [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) |
7777
| [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) |
78+
| [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) |
79+
| [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) |
80+
| [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) |
7881
| [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) |
7982
| [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) |
8083
| [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) |

packages/vector_graphics/.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: a7790d8e3a6c1810b8ce77cc9339d8b30ff68019
8+
channel: unknown
9+
10+
project_type: package

packages/vector_graphics/AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Flutter project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
## 1.1.12
2+
3+
* Transfers the package source from https://github.com/dnfield/vector_graphics
4+
to https://github.com/flutter/packages.
5+
6+
## 1.1.11+1
7+
8+
* Relax package:http constraint.
9+
10+
## 1.1.11
11+
12+
* Use package:http to drop dependency on dart:html.
13+
14+
## 1.1.10+1
15+
16+
* Add missing save before clip.
17+
18+
## 1.1.10
19+
20+
* Add missing clip before saveLayer.
21+
22+
## 1.1.9+2
23+
24+
* Fix case sensitivity on scientific notation parsing.
25+
26+
## 1.1.9+1
27+
28+
* Fix publication error that did not have latest source code.
29+
30+
## 1.1.9
31+
32+
* Fix handling of invalid XML `@id` attributes.
33+
* Fix handling of self-referential `<use/>` elements.
34+
* Add `--out-dir` option to compiler.
35+
* Tweak warning message for unhandled eleemnts.
36+
37+
## 1.1.8
38+
39+
* Fix bugs in transform parsing.
40+
41+
## 1.1.7
42+
43+
* Support for matching the ambient text direction.
44+
45+
## 1.1.6
46+
47+
* Fix bug in text position computation when transforms are involved.
48+
49+
## 1.1.5+1
50+
51+
* Remove/update some invalid assertions related to image formats.
52+
53+
## 1.1.5
54+
55+
* Support for decoding control points as IEEE 754-2008 half precision
56+
floating point values.
57+
* Migrate the test to extend DefaultWidgetsLocalizations.
58+
* Added an error builder property to provide a fallback widget on exceptions.
59+
60+
## 1.1.4
61+
62+
* Support more image formats and malformed MIME types.
63+
* Fix inheritence for `fill-rule`s.
64+
65+
## 1.1.3
66+
67+
* Further improvements to whitespace handling for text.
68+
69+
## 1.1.2
70+
71+
* Fix handling and inheritence of `none`.
72+
73+
## 1.1.1
74+
75+
* Multiple text positioning bug fixes.
76+
* Preserve stroke-opacity when specified.
77+
78+
## 1.1.0
79+
80+
* Fix a number of inheritence related bugs:
81+
* Inheritence of properties specified on the root element now work.
82+
* Opacity inheritence is more correct now.
83+
* Inheritence of `use` elements is more correctly handled.
84+
* Make `currentColor` non-null on SVG theme, and fix how it is applied.
85+
* Remove the opacity peephole optimizer, which was incorrectly applying
86+
optimizations in a few cases. A future release may add this back.
87+
* Add clipBehavior to the widget.
88+
* Fix patterns when multiple patterns are specified and applied within the
89+
graphic.
90+
91+
## 1.0.1+1
92+
93+
* Fix bug in asset loading from packages.
94+
95+
## 1.0.1
96+
97+
* Fix handling of fill colors on use/group elements.
98+
99+
## 1.0.0+1
100+
101+
* Fix issue in pattern decoding.
102+
* Fix issue in matrix parsing for some combinations of matrices.
103+
104+
## 1.0.0
105+
106+
* Stable release.
107+
* Use `ImageCache` for images.
108+
* Bug fixes for image rendering.
109+
* Better support for synchronous usage in testing.
110+
* Make clipping the viewbox optional.
111+
112+
## 0.0.3
113+
114+
* Improvements to CLI utilities.
115+
* Dispose unused objects.
116+
* Improved support for HTML backend.
117+
* Less aggressive rasterization strategy for flutter_svg compatibility.
118+
119+
## 0.0.2
120+
121+
* Support for drawing images
122+
123+
## 0.0.1
124+
125+
* Added `VectorGraphic` which consumes encoded vector graphics assets using
126+
a `BytesLoader`.
127+
* Added `AssetBytesLoader` and `NetworkBytesLoader` as example loader
128+
implementations.
129+
130+
## 0.0.0
131+
132+
* Create repository

packages/vector_graphics/LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2013 The Flutter Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

packages/vector_graphics/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# vector_graphics
2+
3+
A vector graphics rendering runtime for Flutter. This package is intended for
4+
use with output from the `package:vector_graphics_compiler` and encoded via
5+
a tightly coupled version of `package:vector_graphics_codec`.
6+
7+
## Commemoration
8+
9+
This package was originally authored by
10+
[Dan Field](https://github.com/dnfield) and has been forked here
11+
from [dnfield/vector_graphics](https://github.com/dnfield/vector_graphics).
12+
Dan was a member of the Flutter team at Google from 2018 until his death
13+
in 2024. Dan’s impact and contributions to Flutter were immeasurable, and we
14+
honor his memory by continuing to publish and maintain this package.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
android/
2+
ios/
3+
macos/
4+
linux/
5+
windows/
6+
web/
7+
test/
8+
android/
9+
ios/
10+
macos/
11+
linux/
12+
windows/
13+
web/
14+
test/
15+
.metadata
16+
17+
# Miscellaneous
18+
*.class
19+
*.log
20+
*.pyc
21+
*.swp
22+
.DS_Store
23+
.atom/
24+
.buildlog/
25+
.history
26+
.svn/
27+
28+
# IntelliJ related
29+
*.iml
30+
*.ipr
31+
*.iws
32+
.idea/
33+
34+
# The .vscode folder contains launch configuration and tasks you configure in
35+
# VS Code which you may wish to be included in version control, so this line
36+
# is commented out by default.
37+
#.vscode/
38+
39+
# Flutter/Dart/Pub related
40+
**/doc/api/
41+
**/ios/Flutter/.last_build_id
42+
.dart_tool/
43+
.flutter-plugins
44+
.flutter-plugins-dependencies
45+
.packages
46+
.pub-cache/
47+
.pub/
48+
/build/
49+
50+
# Web related
51+
52+
# Symbolication related
53+
app.*.symbols
54+
55+
# Obfuscation related
56+
app.*.map.json
57+
58+
# Android Studio will place build artifacts here
59+
/android/app/debug
60+
/android/app/profile
61+
/android/app/release
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# example
2+
3+
An example of using package:vector_graphics to draw vector assets
59.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)