Instantly share code, notes, and snippets.

Embed
What would you like to do?
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