carousel_image_editor 0.1.9 copy "carousel_image_editor: ^0.1.9" to clipboard
carousel_image_editor: ^0.1.9 copied to clipboard

Carousel Image Editor Plugin with filters, drawing, text and emoji like stories.

example/lib/main.dart

import 'package:carousel_image_editor/custom_image_editor.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MaterialApp(home: ImageEditorExample()));
}

class ImageEditorExample extends StatefulWidget {
  const ImageEditorExample({
    super.key,
  });

  @override
  createState() => _ImageEditorExampleState();
}

class _ImageEditorExampleState extends State<ImageEditorExample> {
  List<Uint8List> imageListData = [];

  @override
  void initState() {
    super.initState();
    loadAsset("image.jpg");
  }

  void loadAsset(String name) async {
    var data = await rootBundle.load('assets/$name');
    setState(() =>
        imageListData = [data.buffer.asUint8List(), data.buffer.asUint8List()]);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("ImageEditor Example"),
        centerTitle: true,
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          if (imageListData.isNotEmpty) Image.memory(imageListData[0]),
          const SizedBox(height: 16),
          ElevatedButton(
            child: const Text("Multiple image editor"),
            onPressed: () async {
              if (imageListData.isNotEmpty) {
                final List<Uint8List> editedImage = await Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => ImagesEditor(
                      images: [imageListData[0], imageListData[0]],
                    ),
                  ),
                );

                // replace with edited image

                setState(() {
                  imageListData = editedImage;
                });
              }
            },
          ),
        ],
      ),
    );
  }
}
5
likes
130
points
76
downloads

Publisher

unverified uploader

Weekly Downloads

Carousel Image Editor Plugin with filters, drawing, text and emoji like stories.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

colorfilter_generator, extended_image, flutter, flutter_image_compress, hand_signature, image, permission_handler, reorderables, screenshot

More

Packages that depend on carousel_image_editor