搜索插件、代码仓与 APP 分类

flutter_story_editor 封面
插件详情v0.0.2

flutter_story_editor

此包使用 WhatsApp 故事图片/视频编辑器的风格,您可以编辑图片和视频。您可以添加文字、贴纸、手指绘画、应用滤镜以及撤销操作。

AndroidiOS
近 30 天下载
35
喜欢数
47
Pub 分数
130

安装插件

flutter pub add flutter_story_editor

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个受 WhatsApp 故事编辑器启发的 Flutter 包,让用户能够使用直观的工具编辑图片和视频。它支持添加文字、贴纸、手指绘画、应用滤镜以及撤销操作。专为在应用内实现无缝多媒体编辑而设计,可在 Android 和 iOS 上顺畅集成。该包简化了通过丰富媒体增强功能创建吸引人故事的过程。

适合场景

  • 创建社交媒体故事
  • 编辑用户生成的内容
  • 使用故事功能构建消息应用
  • 向图片和视频添加创意叠加
  • 启用实时绘图和注释

主要特点

  • 文本叠加支持
  • 贴纸添加
  • 手指绘图工具
  • 过滤应用
  • 撤销功能
  • 跨平台兼容性

适合对象

  • 社交网络应用
  • 消息平台
  • 内容创作工具
  • 移动故事应用
  • 创意照片和视频编辑器

使用建议

  • 需要媒体访问权限
  • 性能可能因大视频文件而异
  • 贴纸资源的自定义选项有限
  • 取决于底层平台的渲染
  • 可能需要对导出格式进行额外处理

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutter_story_editor Pub

This package is created using style of the WhatsApp story image/video editor, with which you can edit images and videos both together. You can add texts, stickers, freehand finger drawing, apply filter, and undo. The edited images will be returned in a onSave call back as List of Files. You can then upload it to some storage or save it locally to your gallery.

Video editing for now only support trimming. In future more video editing features will be added.

Features

✅ You can edit Images, and videos both together.

✅ Draggable fancy text with (custom colors, font families, and resize)

✅ Draggable stickers & emojis

✅ Apply filters to images

✅ Freehand drawing over images

✅ Trimming video frames

Future features

🚀 Drawing painting over video frames (requires platform specific work)

🚀 More image and video editing functionality like (WhatsApp & Instagram) stories

🚀 The UI is currently like WhatsApp, but I think we should go with something unique for flutter (your contribution & ideas will be very invaluable)

🚀 improve and enhance performance and existing features.

Package Demo

Installation

Add flutter_story_editor: latest_version to your pubspec.yaml and then import it.

dartimport 'package:stories_editor/stories_editor.dart';

Android

add the following code to your AndroidMAnifest.xml file

<activity
 android:name="com.yalantis.ucrop.UCropActivity"
 android:screenOrientation="portrait"
 android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
iOS

add the following code to your info.plist file

<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>

How to use

  // Inialize controllers within the state
  FlutterStoryEditorController controller = FlutterStoryEditorController();
  final TextEditingController _captionController = TextEditingController();
  
  // TODO: create a method to pick files (videos and images) either separate or together.


    // Select files 
    selectMedia().then((value) {
                  if (_selectedMedia != null && _selectedMedia!.isNotEmpty) {
                    showModalBottomSheet(
                      isScrollControlled: true,
                      isDismissible: false,
                      enableDrag: false,
                      context: context,
                      builder: (context) {

                        return FlutterStoryEditor(
                            controller: controller,
                            captionController: _captionController,
                            selectedFiles: _selectedMedia,
                            onSaveClickListener: (files) {
                              // Here you go with your edited files.
                            }
                        );
                      },
                    );
                  }
                },
              );
            }, icon: const Icon(Icons.upload, size: 50,)),
          ),

For more information : visit example project inside example/example.dart.

Screenshots

Initial view & Multiple images selected

Images & videos together & Apply filters

Crop, scale and rotate & Add draggable stickers

Add emojis & Add draggable fancy text

Draw freehand painting over images

Must read

The initial release of flutter_story_editor may have small bugs, and issues. If you found some, and you're willing to contribute feel free to create issue and rasie a PR. Make sure you inform me through my LinkedIn DM for the issues you create in both cases either or not if you want to contribute.

This package will be improved more along the time, your contribution will be very invaluable.

Created & Maintained By

@MuhammadAdnan, LinkedIn : @MuhammadAdnan , Instagram : @MuhammadAdnan.

YouTube : @eTechViral

所属分类

依赖

源码仓库

使用此插件的项目

暂无相关数据。