Skip to content

Commit b8b2e54

Browse files
committed
add svg integration
1 parent b3c71d1 commit b8b2e54

18 files changed

+531
-165
lines changed

example/lib/gen/assets.gen.dart

Lines changed: 83 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/lib/main.dart

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,34 @@ void main() {
1313
),
1414
home: Scaffold(
1515
body: Center(
16-
child: Column(
17-
mainAxisAlignment: MainAxisAlignment.center,
18-
children: <Widget>[
19-
// Auto generated image from FlutterGen.
20-
Image(image: Assets.images.chip1),
21-
Assets.pictures.chip5.image(
22-
width: 120,
23-
height: 120,
24-
fit: BoxFit.scaleDown,
25-
),
26-
const Text(
27-
'Hi there, I\'m FlutterGen',
28-
style: TextStyle(
29-
// Auto generated color from FlutterGen.
30-
color: ColorName.denim,
16+
child: SingleChildScrollView(
17+
child: Column(
18+
mainAxisAlignment: MainAxisAlignment.center,
19+
children: <Widget>[
20+
// Auto generated image from FlutterGen.
21+
Image(image: Assets.images.chip1),
22+
Assets.images.icons.paint,
23+
Assets.images.icons.paint.svg(
24+
matchTextDirection: true,
25+
),
26+
Assets.pictures.chip5.image(
27+
width: 120,
28+
height: 120,
29+
fit: BoxFit.scaleDown,
30+
),
31+
const Text(
32+
'Hi there, I\'m FlutterGen',
33+
style: TextStyle(
34+
// Auto generated color from FlutterGen.
35+
color: ColorName.denim,
3136

32-
// Auto generated font from FlutterGen.
33-
fontFamily: FontFamily.robotoMono,
34-
fontFamilyFallback: [FontFamily.raleway],
37+
// Auto generated font from FlutterGen.
38+
fontFamily: FontFamily.robotoMono,
39+
fontFamilyFallback: [FontFamily.raleway],
40+
),
3541
),
36-
),
37-
],
42+
],
43+
),
3844
),
3945
),
4046
),

example/pubspec.lock

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ packages:
2828
name: async
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "2.4.2"
31+
version: "2.5.0-nullsafety"
3232
boolean_selector:
3333
dependency: transitive
3434
description:
3535
name: boolean_selector
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "2.0.0"
38+
version: "2.1.0-nullsafety"
3939
build:
4040
dependency: transitive
4141
description:
@@ -98,14 +98,14 @@ packages:
9898
name: characters
9999
url: "https://pub.dartlang.org"
100100
source: hosted
101-
version: "1.0.0"
101+
version: "1.1.0-nullsafety.2"
102102
charcode:
103103
dependency: transitive
104104
description:
105105
name: charcode
106106
url: "https://pub.dartlang.org"
107107
source: hosted
108-
version: "1.1.3"
108+
version: "1.2.0-nullsafety"
109109
checked_yaml:
110110
dependency: transitive
111111
description:
@@ -126,7 +126,7 @@ packages:
126126
name: clock
127127
url: "https://pub.dartlang.org"
128128
source: hosted
129-
version: "1.0.1"
129+
version: "1.1.0-nullsafety"
130130
code_builder:
131131
dependency: transitive
132132
description:
@@ -140,7 +140,7 @@ packages:
140140
name: collection
141141
url: "https://pub.dartlang.org"
142142
source: hosted
143-
version: "1.14.13"
143+
version: "1.15.0-nullsafety.2"
144144
convert:
145145
dependency: transitive
146146
description:
@@ -175,7 +175,7 @@ packages:
175175
name: fake_async
176176
url: "https://pub.dartlang.org"
177177
source: hosted
178-
version: "1.1.0"
178+
version: "1.1.0-nullsafety"
179179
fixnum:
180180
dependency: transitive
181181
description:
@@ -194,7 +194,14 @@ packages:
194194
path: ".."
195195
relative: true
196196
source: path
197-
version: "0.0.19"
197+
version: "0.0.21"
198+
flutter_svg:
199+
dependency: "direct main"
200+
description:
201+
name: flutter_svg
202+
url: "https://pub.dartlang.org"
203+
source: hosted
204+
version: "0.18.1"
198205
flutter_test:
199206
dependency: "direct dev"
200207
description: flutter
@@ -269,14 +276,14 @@ packages:
269276
name: matcher
270277
url: "https://pub.dartlang.org"
271278
source: hosted
272-
version: "0.12.8"
279+
version: "0.12.10-nullsafety"
273280
meta:
274281
dependency: transitive
275282
description:
276283
name: meta
277284
url: "https://pub.dartlang.org"
278285
source: hosted
279-
version: "1.1.8"
286+
version: "1.3.0-nullsafety.2"
280287
mime:
281288
dependency: transitive
282289
description:
@@ -311,7 +318,21 @@ packages:
311318
name: path
312319
url: "https://pub.dartlang.org"
313320
source: hosted
314-
version: "1.7.0"
321+
version: "1.8.0-nullsafety"
322+
path_drawing:
323+
dependency: transitive
324+
description:
325+
name: path_drawing
326+
url: "https://pub.dartlang.org"
327+
source: hosted
328+
version: "0.4.1+1"
329+
path_parsing:
330+
dependency: transitive
331+
description:
332+
name: path_parsing
333+
url: "https://pub.dartlang.org"
334+
source: hosted
335+
version: "0.1.4"
315336
pedantic:
316337
dependency: transitive
317338
description:
@@ -379,21 +400,21 @@ packages:
379400
name: source_span
380401
url: "https://pub.dartlang.org"
381402
source: hosted
382-
version: "1.7.0"
403+
version: "1.8.0-nullsafety"
383404
stack_trace:
384405
dependency: transitive
385406
description:
386407
name: stack_trace
387408
url: "https://pub.dartlang.org"
388409
source: hosted
389-
version: "1.9.5"
410+
version: "1.10.0-nullsafety"
390411
stream_channel:
391412
dependency: transitive
392413
description:
393414
name: stream_channel
394415
url: "https://pub.dartlang.org"
395416
source: hosted
396-
version: "2.0.0"
417+
version: "2.1.0-nullsafety"
397418
stream_transform:
398419
dependency: transitive
399420
description:
@@ -407,21 +428,21 @@ packages:
407428
name: string_scanner
408429
url: "https://pub.dartlang.org"
409430
source: hosted
410-
version: "1.0.5"
431+
version: "1.1.0-nullsafety"
411432
term_glyph:
412433
dependency: transitive
413434
description:
414435
name: term_glyph
415436
url: "https://pub.dartlang.org"
416437
source: hosted
417-
version: "1.1.0"
438+
version: "1.2.0-nullsafety"
418439
test_api:
419440
dependency: transitive
420441
description:
421442
name: test_api
422443
url: "https://pub.dartlang.org"
423444
source: hosted
424-
version: "0.2.17"
445+
version: "0.2.19-nullsafety"
425446
timing:
426447
dependency: transitive
427448
description:
@@ -435,14 +456,14 @@ packages:
435456
name: typed_data
436457
url: "https://pub.dartlang.org"
437458
source: hosted
438-
version: "1.2.0"
459+
version: "1.3.0-nullsafety.2"
439460
vector_math:
440461
dependency: transitive
441462
description:
442463
name: vector_math
443464
url: "https://pub.dartlang.org"
444465
source: hosted
445-
version: "2.0.8"
466+
version: "2.1.0-nullsafety.2"
446467
watcher:
447468
dependency: transitive
448469
description:
@@ -472,5 +493,5 @@ packages:
472493
source: hosted
473494
version: "2.2.1"
474495
sdks:
475-
dart: ">=2.9.0 <3.0.0"
476-
flutter: ">=1.20.0"
496+
dart: ">=2.10.0-0.0.dev <2.10.0"
497+
flutter: ">=1.20.0 <2.0.0"

0 commit comments

Comments
 (0)