refactor: removed .fromVector constructor

This commit is contained in:
alestiago
2022-12-05 14:34:48 +00:00
parent 396aeeb783
commit a2ebf8db7c
3 changed files with 5 additions and 15 deletions

View File

@ -18,7 +18,7 @@ class PhotoboothBackground extends StatelessWidget {
return BackgroundAnimation(
x: avatar.direction.x,
y: avatar.direction.y,
z: avatar.distance,
z: 0,
backgroundSelected: backgroundSelected,
);
}

View File

@ -13,18 +13,6 @@ class BackgroundAnimation extends StatefulWidget {
required this.backgroundSelected,
});
BackgroundAnimation.fromVector3(
Vector3 direction, {
Key? key,
required Background backgroundSelected,
}) : this(
key: key,
x: direction.x,
y: direction.y,
z: direction.z,
backgroundSelected: backgroundSelected,
);
final double x;
final double y;
final double z;

View File

@ -15,8 +15,10 @@ void main() {
home: StatefulBuilder(
builder: (context, setState) {
stateSetter = setState;
return BackgroundAnimation.fromVector3(
vector3,
return BackgroundAnimation(
x: vector3.x,
y: vector3.y,
z: vector3.z,
backgroundSelected: background,
);
},