Skip to content

Commit

Permalink
Fix library for flutter stable branch
Browse files Browse the repository at this point in the history
  • Loading branch information
HrX03 committed Oct 27, 2024
1 parent ff53df9 commit 0409dce
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
4 changes: 4 additions & 0 deletions packages/animated_vector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.2

- Fix support for stable branch of flutter

## 0.2.1

- Dispose the internal `AnimationController` for `AnimatedSequence` widgets
Expand Down
8 changes: 4 additions & 4 deletions packages/animated_vector/lib/src/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class RootVectorElement extends VectorElement<RootVectorAnimationProperties> {
Offset.zero & size,
Paint()
..colorFilter = ColorFilter.mode(
const Color(0xFFFFFFFF).withValues(alpha: evaluated.alpha),
const Color(0xFFFFFFFF).withOpacity(evaluated.alpha!),
BlendMode.modulate,
),
);
Expand Down Expand Up @@ -518,8 +518,8 @@ class PathElement extends VectorElement<PathAnimationProperties> {
)
.transform(transform.storage),
Paint()
..color = strokeColor.withValues(
alpha: strokeColor.a * evaluated.strokeAlpha!,
..color = strokeColor.withOpacity(
strokeColor.opacity * evaluated.strokeAlpha!,
)
..strokeWidth = evaluated.strokeWidth!
..strokeCap = strokeCap
Expand All @@ -532,7 +532,7 @@ class PathElement extends VectorElement<PathAnimationProperties> {
evaluated.pathData!.toPath().transform(transform.storage),
Paint()
..color =
fillColor.withValues(alpha: fillColor.a * evaluated.fillAlpha!),
fillColor.withOpacity(fillColor.opacity * evaluated.fillAlpha!),
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/animated_vector/lib/src/shapeshifter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ Color? _colorFromHex(String? hex) {
String _colorToHex(Color color) {
// ignore: deprecated_member_use
final String radixString = color.value.toRadixString(16);
if (color.a == 0xFF) return "#${radixString.substring(2)}";
if (color.alpha == 0xFF) return "#${radixString.substring(2)}";
return "#$radixString";
}

Expand Down
2 changes: 1 addition & 1 deletion packages/animated_vector/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: animated_vector
description: A package that adds support for vector data based animations.
version: 0.2.1
version: 0.2.2
homepage: https://github.com/HrX03/animated_vector/tree/main/packages/animated_vector_annotations
repository: https://github.com/HrX03/animated_vector
license: MIT
Expand Down
4 changes: 4 additions & 0 deletions packages/animated_vector_annotations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
##0.2.2

Update dependency on animated_vector

## 0.2.1

Export libraries for generated files from the main animated_vector_annotations library
Expand Down
4 changes: 2 additions & 2 deletions packages/animated_vector_annotations/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: animated_vector_annotations
description: Code generation annotations for animated_vector_gen and animated_vector.
version: 0.2.1
version: 0.2.2
license: MIT
homepage: https://github.com/HrX03/animated_vector/tree/main/packages/animated_vector_annotations
repository: https://github.com/HrX03/animated_vector
Expand All @@ -9,7 +9,7 @@ environment:
sdk: ^3.1.0

dependencies:
animated_vector: ^0.2.1
animated_vector: ^0.2.2
flutter:
sdk: flutter
meta: ^1.9.1
4 changes: 4 additions & 0 deletions packages/animated_vector_gen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.3

Update dependency on animated_vector_annotations

## 0.2.2

- Ignore hidden layers inside the shapeshifter file
Expand Down
4 changes: 2 additions & 2 deletions packages/animated_vector_gen/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: animated_vector_gen
description: Code generator for animated_vector. Allows to generate vector data from shape shifter files
version: 0.2.2
version: 0.2.3
license: MIT
homepage: https://github.com/HrX03/animated_vector/tree/main/packages/animated_vector_annotations
repository: https://github.com/HrX03/animated_vector
Expand All @@ -10,7 +10,7 @@ environment:

dependencies:
analyzer: ^6.2.0
animated_vector_annotations: ^0.2.1
animated_vector_annotations: ^0.2.2
build: ^2.4.1
code_builder: ^4.7.0
dart_style: ^2.3.3
Expand Down

0 comments on commit 0409dce

Please sign in to comment.