Table of Contents
Easily integrate powerful image editing capabilities into your Flutter applications with Lumos. This package empowers developers to seamlessly incorporate features like crop, rotate, flip, filters, and more directly into their apps, providing users with robust tools to enhance and customize images on the fly. Whether you're building a photo-sharing app, an e-commerce platform, or a creative tool, the Flutter Image Editor offers a versatile solution with an intuitive interface and efficient performance. Take control of image manipulation in your Flutter projects and elevate user experience with this flexible and easy-to-use package.
Supports Android & iOS only. Soon on web too.
Uint8List editedImage = SingleImageEditor(
image: image,
darkTheme: true,
background: EditorBackground.blur,
viewportSize: MediaQuery.of(context).size,
features: const ImageEditorFeatures(
crop: true,
rotate: true,
adjust: true,
emoji: true,
filters: true,
flip: true,
text: true,
blur: true,
),
cropAvailableRatios: const [
AspectRatioOption(title: 'Freeform'),
AspectRatioOption(title: '1:1', ratio: 1),
AspectRatioOption(title: '4:3', ratio: 4 / 3),
AspectRatioOption(title: '5:4', ratio: 5 / 4),
AspectRatioOption(title: '7:5', ratio: 7 / 5),
AspectRatioOption(title: '16:9', ratio: 16 / 9),
],
),
),
);
List<Uint8List> editedImages = await Navigator.push(
context!,
CupertinoPageRoute(
builder: (context) => MultiImageEditor(
images: images,
darkTheme: false,
background: EditorBackground.none,
viewportSize: MediaQuery.of(context).size,
features: const ImageEditorFeatures(
crop: true,
rotate: true,
adjust: true,
emoji: true,
filters: true,
flip: true,
text: true,
blur: true,
),
cropAvailableRatios: const [
AspectRatioOption(title: 'Freeform'),
AspectRatioOption(title: '1:1', ratio: 1),
AspectRatioOption(title: '4:3', ratio: 4 / 3),
AspectRatioOption(title: '5:4', ratio: 5 / 4),
AspectRatioOption(title: '7:5', ratio: 7 / 5),
AspectRatioOption(title: '16:9', ratio: 16 / 9),
],
),
),
);
Sr No. | Parameter | Type | Description | Required? |
---|---|---|---|---|
1 | image | dynamic | Referance to the image user wants to edit. Only for Single Image Editor. Supported types are: File, Xfile & Uint8List. | Yes |
2 | images | List<dynamic> | Referance to the images user wants to edit. Only for Multi Image Editor. Supported types are: File, Xfile & Uint8List. | Yes |
3 | features | ImageEditorFeatures | The edit features you want the users to have access to. Valid features are: crop, adjust, blur, emoji, flip, rotate, text & filters. All are allowed by default. | No |
4 | cropAvailableRatio | List<AspectRatioOption> | List of crop ratios that will be available to the users. Vaild ratios are: freeform, 1:1, 4:3, 5:4, 7:5 & 16:9. All ratios are available by default. | No |
5 | viewportSize | Size | Viewport size of the user's device to adjust & fit image onto the edit screen. | Yes |
6 | darkTheme | bool | The theme of the image editor. True for dark theme and false for light theme. | Yes |
7 | background | enum EditorBackground | Defines the background of the image editor. Valid constants are: none, blur & gradient | Yes |
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star!
Thanks again!
Distributed under the MIT License. See LICENSE.txt
for more information.
Arman Khan - [email protected]
Project Link - https://github.com/ArmanKhanTech/Lumos