Skip to content

Commit 9cb94c3

Browse files
committed
Merge branch 'main' into assets-style
2 parents 27c10cc + 324cc4d commit 9cb94c3

File tree

7 files changed

+69
-9
lines changed

7 files changed

+69
-9
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ jobs:
7676
credential: ${{ secrets.CREDENTIAL_JSON }}
7777
flutter_package: false
7878
skip_test: true
79-
dry_run: true
79+
dry_run: false
8080

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.3
2+
3+
Bug fix
4+
- Insufficient params of flutter_svg [#32](https://github.com/FlutterGen/flutter_gen/pull/34)
15
## 1.0.2
26

37
Bug fix

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ class $PicturesGen {
264264
class $AssetsImagesGen {
265265
const $AssetsImagesGen();
266266
267-
AssetGenImage get chip2 => const AssetGenImage('assets/images/chip2.jpg');
268267
AssetGenImage get chip1 => const AssetGenImage('assets/images/chip1.jpg');
269-
AssetGenImage get logo => const AssetGenImage('assets/images/logo.png');
270-
AssetGenImage get profile => const AssetGenImage('assets/images/profile.jpg');
268+
AssetGenImage get chip2 => const AssetGenImage('assets/images/chip2.jpg');
271269
$AssetsImagesChip3Gen get chip3 => const $AssetsImagesChip3Gen();
272270
$AssetsImagesChip4Gen get chip4 => const $AssetsImagesChip4Gen();
273271
$AssetsImagesIconsGen get icons => const $AssetsImagesIconsGen();
272+
AssetGenImage get logo => const AssetGenImage('assets/images/logo.png');
273+
AssetGenImage get profile => const AssetGenImage('assets/images/profile.jpg');
274274
}
275275
276276
class $AssetsJsonGen {
@@ -384,6 +384,19 @@ class SvgGenImage {
384384
return SvgPicture.asset(
385385
_assetName,
386386
matchTextDirection: matchTextDirection,
387+
bundle: bundle,
388+
package: package,
389+
width: width,
390+
height: height,
391+
fit: fit,
392+
alignment: alignment,
393+
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
394+
placeholderBuilder: placeholderBuilder,
395+
color: color,
396+
colorBlendMode: colorBlendMode,
397+
semanticsLabel: semanticsLabel,
398+
excludeFromSemantics: excludeFromSemantics,
399+
clipBehavior: clipBehavior,
387400
);
388401
}
389402
@@ -500,10 +513,11 @@ import 'package:flutter/material.dart';
500513
class ColorName {
501514
ColorName._();
502515
503-
static const Color white = Color(0xFFFFFFFF);
504516
static const Color black = Color(0xFF000000);
505-
static const Color gray70 = Color(0xFFEEEEEE);
506-
static const Color gray410 = Color(0xFF979797);
517+
static const Color black30 = Color(0x4D000000);
518+
static const Color black40 = Color(0x66000000);
519+
static const Color black50 = Color(0x80000000);
520+
static const Color black60 = Color(0x99000000);
507521
static const MaterialColor crimsonRed = MaterialColor(
508522
0xFFCF2A2A,
509523
<int, Color>{
@@ -519,6 +533,9 @@ class ColorName {
519533
900: Color(0xFFB20F0F),
520534
},
521535
);
536+
static const Color gray410 = Color(0xFF979797);
537+
static const Color gray70 = Color(0xFFEEEEEE);
538+
static const Color white = Color(0xFFFFFFFF);
522539
static const MaterialColor yellowOcher = MaterialColor(
523540
0xFFDF9527,
524541
<int, Color>{
@@ -535,6 +552,7 @@ class ColorName {
535552
},
536553
);
537554
}
555+
538556
```
539557

540558
</p>
@@ -561,7 +579,6 @@ and open a [pull request](https://github.com/FlutterGen/flutter_gen/pulls).
561579
- [x] Fonts generation
562580
- [x] Colors generation
563581
- [x] Support xml
564-
- [ ] Support clr?
565582
- [x] Support change output path
566583
- [x] Support hierarchical generation
567584
'assets/image/home/label.png' => Assets.image.home.label

example/lib/gen/assets.gen.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ class SvgGenImage {
136136
return SvgPicture.asset(
137137
_assetName,
138138
matchTextDirection: matchTextDirection,
139+
bundle: bundle,
140+
package: package,
141+
width: width,
142+
height: height,
143+
fit: fit,
144+
alignment: alignment,
145+
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
146+
placeholderBuilder: placeholderBuilder,
147+
color: color,
148+
colorBlendMode: colorBlendMode,
149+
semanticsLabel: semanticsLabel,
150+
excludeFromSemantics: excludeFromSemantics,
151+
clipBehavior: clipBehavior,
139152
);
140153
}
141154

lib/src/generators/integrations/svg_integration.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ class SvgIntegration extends Integration {
3232
return SvgPicture.asset(
3333
_assetName,
3434
matchTextDirection: matchTextDirection,
35+
bundle: bundle,
36+
package: package,
37+
width: width,
38+
height: height,
39+
fit: fit,
40+
alignment: alignment,
41+
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
42+
placeholderBuilder: placeholderBuilder,
43+
color: color,
44+
colorBlendMode: colorBlendMode,
45+
semanticsLabel: semanticsLabel,
46+
excludeFromSemantics: excludeFromSemantics,
47+
clipBehavior: clipBehavior,
3548
);
3649
}
3750

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_gen
22
description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
3-
version: 1.0.2
3+
version: 1.0.3
44
komepage: https://github.com/FlutterGen/flutter_gen
55
repository: https://github.com/FlutterGen/flutter_gen
66
documentation: https://github.com/FlutterGen/flutter_gen

test_resources/actual_data/assets.gen.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ class SvgGenImage {
136136
return SvgPicture.asset(
137137
_assetName,
138138
matchTextDirection: matchTextDirection,
139+
bundle: bundle,
140+
package: package,
141+
width: width,
142+
height: height,
143+
fit: fit,
144+
alignment: alignment,
145+
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
146+
placeholderBuilder: placeholderBuilder,
147+
color: color,
148+
colorBlendMode: colorBlendMode,
149+
semanticsLabel: semanticsLabel,
150+
excludeFromSemantics: excludeFromSemantics,
151+
clipBehavior: clipBehavior,
139152
);
140153
}
141154

0 commit comments

Comments
 (0)