v1.1.1cropperx
一个用 Flutter 编写的图像裁剪包。可用于裁剪和旋转图像。
speedkodi/flutter_cropperx open-source repository details.
以下为英文项目原文快照,最新内容请访问 GitHub。
A cropper package made fully in Flutter.
| Circle | Rectangle | Grid |
|---|---|---|
![]() |
![]() |
![]() |
The overlay can be defined by adding an overlay type through the overlayType parameter. The following types are currently supported:
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.
// 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
)
依赖清单 2 项
{"sdk":"flutter"}{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗