Created
February 23, 2020 22:53
-
-
Save flippingbitss/0416eec089df6ac3aa359a99becf8314 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 Blob extends StatelessWidget { | |
final double rotation; | |
final double scale; | |
final Color color; | |
const Blob({@required this.color, this.rotation = 0, this.scale = 1}) | |
: assert(color != null); | |
@override | |
Widget build(BuildContext context) { | |
return Transform.scale( | |
scale: scale, | |
child: Transform.rotate( | |
angle: rotation, | |
child: Container( | |
decoration: BoxDecoration( | |
color: color, | |
borderRadius: BorderRadius.only( | |
topLeft: Radius.circular(150), | |
topRight: Radius.circular(240), | |
bottomLeft: Radius.circular(220), | |
bottomRight: Radius.circular(180), | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment