-
-
Save MarcinusX/6f20fac94cff0587581cb5bbffadbfaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GenderArrow extends StatelessWidget { | |
final double angle; | |
const GenderArrow({Key key, this.angle}) : super(key: key); | |
double _arrowLength(BuildContext context) => screenAwareSize(32.0, context); | |
double _translationOffset(BuildContext context) => _arrowLength(context) * -0.4; | |
@override | |
Widget build(BuildContext context) { | |
return Transform.rotate( | |
angle: angle, | |
child: Transform.translate( | |
offset: Offset(0.0, _translationOffset(context)), | |
child: Transform.rotate( | |
angle: -_defaultGenderAngle, | |
child: SvgPicture.asset( | |
"images/gender_arrow.svg", | |
height: _arrowLength(context), | |
width: _arrowLength(context), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment