Skip to content

Instantly share code, notes, and snippets.

@flippingbitss
Created February 23, 2020 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flippingbitss/0416eec089df6ac3aa359a99becf8314 to your computer and use it in GitHub Desktop.
Save flippingbitss/0416eec089df6ac3aa359a99becf8314 to your computer and use it in GitHub Desktop.
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