搜尋套件、儲存庫與 APP 分類

cropperx 封面
套件詳情v1.1.1

cropperx

一個使用 Flutter 建立的影像裁切套件。可用於裁切與旋轉影像。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
6600
喜歡數
89
Pub 分數
160

安裝套件

flutter pub add cropperx

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

CropperX 是一個專為 Flutter 設計的套件,旨在以乾淨直覺的介面進行圖片裁剪與旋轉。此套件支援跨平台使用,相容於 Android、iOS、Web、macOS、Windows 與 Linux。該套件提供可自訂的控制項,用於調整裁切區域與圖像旋轉,非常適合需要精確圖像編輯的應用程式。CropperX 可透過簡單的 API 順暢整合至 Flutter 應用中,讓開發者能快速實作圖片裁剪功能。CropperX 輕巧且高效,專注於效能與易用性。

適用情境

  • 影像資料編輯
  • 文件掃描工作流程
  • 照片編輯工具
  • 社群媒體內容創作
  • 使用者產生的內容處理

主要特色

  • 互動式圖像裁剪
  • 即時旋轉支援
  • 跨平台相容性
  • 可自訂的 UI 控件
  • 與 Flutter 的簡單整合

適合對象

  • 行動應用開發者
  • Web應用程式創建者
  • 圖像處理功能
  • 面向用戶的照片編輯器
  • 需要文件或身份驗證的應用程式

使用建議

  • 需要在裁剪前載入影像
  • 僅限基本編輯操作
  • 無內建影像儲存功能
  • 可能需要為自定義主題添加額外的樣式
  • 依賴外部圖像源處理

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

CropperX

A cropper package made fully in Flutter.

Circle Rectangle Grid
Screenshot circle Screenshot rectangle Screenshot grid
Types of overlays

The overlay can be defined by adding an overlay type through the overlayType parameter. The following types are currently supported:

  • OverlayType.none: No overlay at all.
  • OverlayType.circle: An overlay with a circular gap.
  • OverlayType.rectangle: An overlay with a rectangular gap, takes the given aspect ratio.
  • OverlayType.grid: An overlay of grid lines: 2 horizontal and 2 vertical, evenly spaced.
  • OverlayType.gridHorizontal: An overlay of 2 horizontal grid lines, evenly spaced.
  • OverlayType.gridVertical: An overlay of 2 vertical grid lines, evenly spaced.
Rotating the image

The image rotation can be defined through the rotationTurns parameter. The default value is 0, corresponding to 0 degrees of rotation. Making the value larger by 1 will rotate the image 90 degrees clockwise, making it smaller will rotate the image 90 degrees counterclockwise. 0 to 4 is not a limit, so going above or below these values will keep rotating the image.

Example
// Import package
import 'package:cropperx/cropper.dart';

// Define a key
final _cropperKey = GlobalKey(debugLabel: 'cropperKey');

// Add the Cropper widget to your tree, using the above key and adding the image to crop
Cropper(
    cropperKey: _cropperKey, // Use your key here
    image: Image.network(
        'https://i.pinimg.com/originals/6b/4d/18/6b4d18c0b756ab20c3591490dfc10090.jpg',
    ),
)

// Get the cropped image as bytes
final imageBytes = await Cropper.crop(
    cropperKey: _cropperKey, // Reference it through the key
)

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。