buildPaint method

Widget buildPaint(
  1. VideoEditorController controller, {
  2. CropBoundaries? boundary,
  3. bool showGrid = false,
  4. bool showCenterRects = false,
})

Implementation

Widget buildPaint(
  VideoEditorController controller, {
  CropBoundaries? boundary,
  bool showGrid = false,
  bool showCenterRects = false,
}) {
  return ValueListenableBuilder(
    valueListenable: rect,

    /// Build a [Widget] that hides the cropped area and show the crop grid if widget.showGris is true
    builder: (_, Rect value, __) => RepaintBoundary(
      child: CustomPaint(
        size: Size.infinite,
        painter: CropGridPainter(
          value,
          style: controller.cropStyle,
          boundary: boundary,
          showGrid: showGrid,
          showCenterRects: showCenterRects,
        ),
      ),
    ),
  );
}