Skip to content

Instantly share code, notes, and snippets.

@MarcinusX MarcinusX/gender_card.dart Secret
Created Aug 24, 2018

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;
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(
height: _arrowLength(context),
width: _arrowLength(context),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.