title: Convert flutter painter to compose
body: <p>I have code in flutter and I have to write an app in android (kotlin). How can I convert flutter painter to display in android compose?</p>
  <pre><code>import 'dart:math' as math;
  import 'dart:ui' as ui;
  
  import 'package:flutter/material.dart';
  
  class FaceOutline extends CustomPainter {
    final Color frameColor;
  
    FaceOutline(this.frameColor);
  
    @override
    void paint(ui.Canvas canvas, ui.Size size) {
      final Path path = Path();
      final Rect rect = Rect.fromCenter(
        center: size.center(Offset.zero),
        width: size.width * 0.95,
        height: size.width * 0.95,
      );
  
      path.addArc(
        rect.translate(0.0, -rect.height * 0.4),
        math.pi * 9.0 / 8.0,
        math.pi * 2.0 / 8.0,
      );
      path.addArc(
        rect.translate(0.0, -rect.height * 0.4),
        math.pi * 13.0 / 8.0,
        math.pi * 2.0 / 8.0,
      );
      path.addArc(
        rect.translate(0.0, rect.height * 0.00),
        math.pi * 1.0 / 8.0,
        math.pi * 2.0 / 8.0,
      );
      path.addArc(
        rect.translate(0.0, rect.height * 0.00),
        math.pi * 5.0 / 8.0,
        math.pi * 2.0 / 8.0,
      );
  
      canvas.drawPath(
        path,
        Paint()
          ..filterQuality = FilterQuality.low
          ..isAntiAlias = true
          ..strokeWidth = 8
          ..strokeCap = StrokeCap.round
          ..strokeJoin = StrokeJoin.round
          ..style = PaintingStyle.stroke
          ..color = frameColor
          ..blendMode = BlendMode.screen,
      );
    }
  
    @override
    bool shouldRepaint(FaceOutline oldDelegate) {
      return frameColor != oldDelegate.frameColor;
    }
  }
  </code></pre>
  <p>I can use xml or compose to display it in kotlin but I have to know how can I write that flutter's code in native android in Compose view.</p>
  <p>You can check code:
  <a href="https://dartpad.dev/?id=b426645ba864beaa66d18212128a71cd" rel="nofollow noreferrer">https://dartpad.dev/?id=b426645ba864beaa66d18212128a71cd</a></p>
  <p>It's what I want to have:</p>
  <p><a href="https://i.stack.imgur.com/0yQNK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0yQNK.jpg" alt="enter image description here" /></a></p>