@@ -52,6 +52,12 @@ class RatingIconPainter extends CustomPainter {
5252 case RatingIconType .verySatisfied:
5353 _drawVerySatisfied (canvas, size, paint);
5454 break ;
55+ case RatingIconType .thumbsUp:
56+ _drawThumbsUp (canvas, size, paint);
57+ break ;
58+ case RatingIconType .thumbsDown:
59+ _drawThumbsDown (canvas, size, paint);
60+ break ;
5561 }
5662 }
5763
@@ -432,6 +438,162 @@ class RatingIconPainter extends CustomPainter {
432438 // Draw circle outline
433439 canvas.drawPath (path, paint);
434440 }
441+
442+ void _drawThumbsUp (Canvas canvas, Size size, Paint paint) {
443+ // Create filled paint style for the thumb
444+ final fillPaint = Paint ()
445+ ..color = paint.color
446+ ..style = PaintingStyle .fill;
447+
448+ Path path = Path ();
449+ final width = _scale;
450+ final height = _scale;
451+
452+ // Left rectangle (base)
453+ path.moveTo (0.08333 * width, 0.83333 * height);
454+ path.lineTo (0.16667 * width, 0.83333 * height);
455+ path.cubicTo (
456+ 0.18958 * width, 0.83333 * height,
457+ 0.20833 * width, 0.81458 * height,
458+ 0.20833 * width, 0.79167 * height,
459+ );
460+ path.lineTo (0.20833 * width, 0.41667 * height);
461+ path.cubicTo (
462+ 0.20833 * width, 0.39375 * height,
463+ 0.18958 * width, 0.375 * height,
464+ 0.16667 * width, 0.375 * height,
465+ );
466+ path.lineTo (0.08333 * width, 0.375 * height);
467+ path.close ();
468+
469+ // Main thumb shape
470+ path.moveTo (0.91208 * width, 0.53667 * height);
471+ path.cubicTo (
472+ 0.91667 * width, 0.52625 * height,
473+ 0.91917 * width, 0.51500 * height,
474+ 0.91917 * width, 0.50333 * height,
475+ );
476+ path.lineTo (0.91917 * width, 0.45833 * height);
477+ path.cubicTo (
478+ 0.91917 * width, 0.4125 * height,
479+ 0.87917 * width, 0.375 * height,
480+ 0.83333 * width, 0.375 * height,
481+ );
482+ path.lineTo (0.60417 * width, 0.375 * height);
483+ path.lineTo (0.6425 * width, 0.18125 * height);
484+ path.cubicTo (
485+ 0.64458 * width, 0.17208 * height,
486+ 0.64333 * width, 0.16292 * height,
487+ 0.63917 * width, 0.15375 * height,
488+ );
489+ path.cubicTo (
490+ 0.62958 * width, 0.13500 * height,
491+ 0.61750 * width, 0.11792 * height,
492+ 0.60250 * width, 0.10292 * height,
493+ );
494+ path.lineTo (0.58333 * width, 0.08333 * height);
495+ path.lineTo (0.31625 * width, 0.35042 * height);
496+ path.cubicTo (
497+ 0.30042 * width, 0.36625 * height,
498+ 0.29167 * width, 0.3875 * height,
499+ 0.29167 * width, 0.40958 * height,
500+ );
501+ path.lineTo (0.29167 * width, 0.73625 * height);
502+ path.cubicTo (
503+ 0.29167 * width, 0.78958 * height,
504+ 0.33542 * width, 0.83333 * height,
505+ 0.38917 * width, 0.83333 * height,
506+ );
507+ path.lineTo (0.72708 * width, 0.83333 * height);
508+ path.cubicTo (
509+ 0.75625 * width, 0.83333 * height,
510+ 0.78542 * width, 0.81792 * height,
511+ 0.79875 * width, 0.79292 * height,
512+ );
513+ path.lineTo (0.90958 * width, 0.53667 * height);
514+ path.close ();
515+
516+ // Draw the filled thumb
517+ canvas.drawPath (path, fillPaint);
518+ }
519+
520+ void _drawThumbsDown (Canvas canvas, Size size, Paint paint) {
521+ // Create filled paint style for the thumb
522+ final fillPaint = Paint ()
523+ ..color = paint.color
524+ ..style = PaintingStyle .fill;
525+
526+ Path path = Path ();
527+ final width = _scale;
528+ final height = _scale;
529+
530+ // Right rectangle (base)
531+ path.moveTo (0.91667 * width, 0.16667 * height);
532+ path.lineTo (0.83333 * width, 0.16667 * height);
533+ path.cubicTo (
534+ 0.81042 * width, 0.16667 * height,
535+ 0.79167 * width, 0.18542 * height,
536+ 0.79167 * width, 0.20833 * height,
537+ );
538+ path.lineTo (0.79167 * width, 0.58333 * height);
539+ path.cubicTo (
540+ 0.79167 * width, 0.60625 * height,
541+ 0.81042 * width, 0.625 * height,
542+ 0.83333 * width, 0.625 * height,
543+ );
544+ path.lineTo (0.91667 * width, 0.625 * height);
545+ path.close ();
546+
547+ // Main thumb shape
548+ path.moveTo (0.09042 * width, 0.46333 * height);
549+ path.cubicTo (
550+ 0.08583 * width, 0.47375 * height,
551+ 0.08333 * width, 0.485 * height,
552+ 0.08333 * width, 0.49667 * height,
553+ );
554+ path.lineTo (0.08333 * width, 0.54167 * height);
555+ path.cubicTo (
556+ 0.08333 * width, 0.5875 * height,
557+ 0.12083 * width, 0.625 * height,
558+ 0.16667 * width, 0.625 * height,
559+ );
560+ path.lineTo (0.39583 * width, 0.625 * height);
561+ path.lineTo (0.3575 * width, 0.81875 * height);
562+ path.cubicTo (
563+ 0.35542 * width, 0.82792 * height,
564+ 0.35667 * width, 0.83708 * height,
565+ 0.36083 * width, 0.84625 * height,
566+ );
567+ path.cubicTo (
568+ 0.37042 * width, 0.865 * height,
569+ 0.3825 * width, 0.88208 * height,
570+ 0.3975 * width, 0.89708 * height,
571+ );
572+ path.lineTo (0.41667 * width, 0.91667 * height);
573+ path.lineTo (0.68375 * width, 0.64958 * height);
574+ path.cubicTo (
575+ 0.69958 * width, 0.63375 * height,
576+ 0.70833 * width, 0.6125 * height,
577+ 0.70833 * width, 0.59042 * height,
578+ );
579+ path.lineTo (0.70833 * width, 0.26417 * height);
580+ path.cubicTo (
581+ 0.70833 * width, 0.21042 * height,
582+ 0.66458 * width, 0.16667 * height,
583+ 0.61083 * width, 0.16667 * height,
584+ );
585+ path.lineTo (0.27292 * width, 0.16667 * height);
586+ path.cubicTo (
587+ 0.24375 * width, 0.16667 * height,
588+ 0.21458 * width, 0.18208 * height,
589+ 0.20125 * width, 0.20708 * height,
590+ );
591+ path.lineTo (0.09042 * width, 0.46333 * height);
592+ path.close ();
593+
594+ // Draw the filled thumb
595+ canvas.drawPath (path, fillPaint);
596+ }
435597}
436598
437599enum RatingIconType {
@@ -440,6 +602,8 @@ enum RatingIconType {
440602 neutral,
441603 satisfied,
442604 verySatisfied,
605+ thumbsUp,
606+ thumbsDown,
443607}
444608
445609class RatingIcon extends StatelessWidget {
0 commit comments