Instantly share code, notes, and snippets.

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