flutter_image_clip 0.6.0
flutter_image_clip: ^0.6.0 copied to clipboard
A reusable Android and iOS Flutter image clipping library with a ready-to-use crop editor UI and image processing APIs.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_image_clip/flutter_image_clip.dart';
void main() {
runApp(const ImageClipExampleApp());
}
class ImageClipExampleApp extends StatelessWidget {
const ImageClipExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Image Clip',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFF006D77)),
scaffoldBackgroundColor: const Color(0xFFF5F7F8),
),
home: Builder(
builder: (context) {
return ImageClipEditor(
theme: ImageClipEditorTheme.fromColorScheme(
Theme.of(context).colorScheme,
),
aspectRatios: const <ImageClipAspectRatio>[
// ImageClipAspectRatio.square,
ImageClipAspectRatio.portrait,
ImageClipAspectRatio.landscape,
// ImageClipAspectRatio.widescreen,
],
);
},
),
);
}
}