v0.0.9
dynamic_image_crop
一个 Flutter 包,可通过绘制线条或裁剪成各种形状来裁剪图像。
30喜欢 77近 30 天下载150Pub 分数
AndroidiOSmacOSWindowsLinux
一个用于通过绘制线条或裁剪为各种形状来裁剪图像的 Flutter 包
以下为英文项目原文快照,最新内容请访问 GitHub。
A Flutter package to crop images into various shapes.
You can test the package by this link: demo_link
dynamic_image_crop supports the following features:
import 'package:dynamic_image_crop/dynamic_image_crop.dart';
final controller = CropController();
DynamicImageCrop(
controller: controller,
image: image!, // Uint8List
onResult: (image, width, height) {
// cropped Image (Uint8List), width and height
},
cropLineColor: Colors.red, // (Optional)
cropLineWidth: 1.0, // (Optional)
)
DynamicImageCrop.fromFile(
imageFile: file, // File
controller: controller,
onResult: (image, width, height) {
// cropped Image (Uint8List), width and height
},
)
CropController has the following methods:
void cropImage() {}
void changeType(CropType type) {}
void changeImage(Uint8List image) {}
void clearCropArea() {}
CropType has the following types:
enum CropType {
rectangle, circle, triangle, drawing, none
}
依赖清单 3 项
{"sdk":"flutter"}{"sdk":"flutter"}—先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗