SHARE
TWEET

Untitled

a guest Dec 10th, 2018 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TrianglePainter extends CustomPainter {
  2.   @override
  3.   void paint(Canvas canvas, Size size) {
  4.     Paint paint = Paint()
  5.       ..color = Colors.grey
  6.       ..strokeWidth = 2.0;
  7.     Path path = Path();
  8.     path.moveTo(0.0, size.height);
  9.     path.lineTo(size.width, 0.0);
  10.     path.lineTo(size.width, size.height);
  11.     canvas.drawPath(path, paint);
  12.   }
  13.  
  14.   @override
  15.   bool shouldRepaint(CustomPainter oldDelegate) {
  16.     return false;
  17.   }
  18. }
  19.    
  20. Row(
  21.          crossAxisAlignment: CrossAxisAlignment.start,
  22.          children: <Widget>[
  23.            SizedBox(
  24.              height: 8.0,
  25.              width: 5.0,
  26.              child: CustomPaint(
  27.                painter: TrianglePainter(),
  28.              ),
  29.            ),
  30.            Container(
  31.              decoration: BoxDecoration(
  32.                  color: Colors.red,
  33.                  borderRadius: BorderRadius.only(
  34.                      topRight: Radius.circular(6.0),
  35.                      bottomLeft: Radius.circular(6.0))),
  36.              width: 120.0,
  37.              height: 30.0,
  38.              child: Center(
  39.                child: Text(
  40.                  'Customer Replay',
  41.                 style: TextStyle(color: Colors.white),
  42.                ),
  43.              ),
  44.            ),
  45.          ],
  46.         ),
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top