-
-
Save MarcinusX/f9e26f07e3b8df4bd688b17f00aa0695 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
double _circleSize(BuildContext context) => screenAwareSize(80.0, context); | |
class _GenderCardState extends State<GenderCard> { | |
@override | |
Widget build(BuildContext context) { | |
return ... | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: <Widget>[ | |
CardTitle("GENDER"), | |
Padding( | |
padding: EdgeInsets.only(top: screenAwareSize(16.0, context)), | |
child: _drawMainStack(), | |
), | |
], | |
), | |
... | |
} | |
Widget _drawMainStack() { | |
return Stack( | |
alignment: Alignment.bottomCenter, | |
children: <Widget>[ | |
_drawCircleIndicator(), | |
], | |
); | |
} | |
Widget _drawCircleIndicator() { | |
return Stack( | |
alignment: Alignment.center, | |
children: <Widget>[ | |
GenderCircle(), | |
], | |
); | |
} | |
} | |
class GenderCircle extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
width: _circleSize(context), | |
height: _circleSize(context), | |
decoration: BoxDecoration( | |
shape: BoxShape.circle, | |
color: Color.fromRGBO(244, 244, 244, 1.0), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment