Created
June 26, 2018 04:13
-
-
Save hnvn/211424f929573e58d166657618079cfe 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 FlipWidget extends StatelessWidget { | |
Widget child; | |
FlipWidget({Key key, this.child}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
mainAxisSize: MainAxisSize.min, | |
children: [ | |
ClipRect( | |
child: Align( | |
alignment: Alignment.topCenter, | |
heightFactor: 0.5, | |
child: child, | |
)), | |
Padding( | |
padding: EdgeInsets.only(top: 2.0), | |
), | |
ClipRect( | |
child: Align( | |
alignment: Alignment.bottomCenter, | |
heightFactor: 0.5, | |
child: child, | |
)), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment