Path path = Path();
path.lineTo(0.0, 0.0);
path.lineTo(size.width, 0.0);
path.lineTo(size.width, size.height * 0.8);
path.lineTo(0.0, size.height);
path.close();
-
Paint
strokeWidth
Paint paint = Paint()
..style = PaintingStyle.stroke
..strokeWidth=10.0
..color = Colors.black;
canvas
canvas.drawPath(path, paint);
CustomPaint
ClipPath(
clipper: traingleclipper(),
child: Container(
color: Colors.white,
child: CustomPaint(
painter: ClipperBorderPainter(),
),
),
)
Stack
Stack(
children: <Widget>[
ClipPath(
clipper: CustomClip(),
child: Image.network(
"http://www.delonghi.com/Global/recipes/multifry/pizza_fresca.jpg",
width: double.infinity,
height: 400.0,
fit: BoxFit.cover,
)),
CustomPaint(
painter: BorderPainter(),
child: Container(
height: 400.0,
),
),
],
),
Full Example