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

vs_story_designer 封面
插件详情v2.2.1

vs_story_designer

这是一个以Instagram故事创建器风格创建的包,可用来创建包含图片、文字和手指绘画的图像。

AndroidiOS
近 30 天下载
164
喜欢数
46
Pub 分数
140

安装插件

flutter pub add vs_story_designer

插件介绍

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

vs_story_designer 是一个 Flutter 包,允许用户创建带有交互元素(如图片、文字叠加和手绘草图)的 Instagram 风格故事。该包适用于 Android 和 iOS,为在应用内直接创作视觉丰富的内容提供了简单界面。该包支持编辑、保存和压缩多媒体输出,非常适合社交平台集成。它专注于易用性和实时创意。

适合场景

  • 创建社交媒体故事
  • 设计自定义图像叠加
  • 添加手写注释
  • 将故事创作集成到应用中
  • 分享用户生成的内容
  • 为移动应用构建创意工具

主要特点

  • 图像和文本叠加
  • 实时手指绘图
  • 多平台支持(Android 和 iOS)
  • 轻松导出和压缩
  • 简单的集成API
  • 互动故事创作

适合对象

  • 社交媒体应用开发者
  • 创意工具构建者
  • 移动应用设计师
  • 内容创作者
  • 教育类应用程序开发者
  • 面向用户的设计器界面

使用建议

  • 需要图像访问权限
  • 仅限基本绘图工具
  • 无高级动画支持
  • 依赖外部依赖项
  • 可能需要针对复杂布局进行定制
  • 最适合简单到中等复杂度的设计

原始 README

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

vs_story_designer 2.2.1

flutter story designer

This is a package created in the style of the instagram story creator, with which you can create images with images, texts, finger drawing. They can be exported as an image to the gallery or shared directly to social networks.

Features

[✔️] Draggable image

[✔️] Draggable text

[✔️] Gradient container background

[✔️] Finger painting (normal/translucent/neon)

[✔️] Custom colors, gradients and Google font families

[✔️] Media Picker (vs_media_picker)

[✔️] Save draft as image

[✔️] Get draft local path uri

Demo

If you don't see the images go to the github repository and by the way give me a star :D

showcase gif showcase gif

Installation

This package has been tested in Android and ios, some features works on flutter web

Add vs_story_designer: 2.2.1 to your pubspec.yaml dependencies and then import it.

import 'package:vs_story_designer/vs_story_designer.dart';

How to use

  1. Android

    add uses-permission AndroidManifest.xml file

     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
         android:maxSdkVersion="31" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.VIBRATE"/>
     <!-- Permission is required if you are targeting android 33 and above -->
     <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
     <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
     <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
    
    ios

    add this config to your config.plist

    <key>NSPhotoLibraryUsageDescription</key>
    <string>Privacy - Photo Library Usage Description</string>
    <key>NSMotionUsageDescription</key>
    <string>Motion usage description</string>
    <key>NSPhotoLibraryAddUsageDescription</key>
    <string>NSPhotoLibraryAddUsageDescription</string>
    
  2. Create a VSStoryDesigner() widget with the follow params:

VSStoryDesigner(
    giphyKey: '[YOUR GIPHY API KEY]', /// (String), //disabled feature for now
    onDone: (String uri){
      /// uri is the local path of final render Uint8List
      /// here your code
    },
    mediaPath: mediaPath // OPTIONAL, pass path of media, image to use inside the package by default.
    themeType: ThemeType.dark, // OPTIONAL, DEFAULT ThemeType.dark
    centerText : "Start Designing" //mandatory param, this text will appear in center of story designer
    colorList: [] /// (List<Color>[]) optional param 
    gradientColors: [] /// (List<List<Color>>[]) optional param 
    middleBottomWidget: Container() /// (Widget) optional param, you can add your own logo or text in the bottom tool
    fontFamilyList: [] /// (List<FontType>) optional param
    isCustomFontList: '' /// (bool) if you use a own font list set value to "true"
    onDoneButtonStyle: Container() /// (Widget) optional param, you can create your own button style
    onBackPress: /// (Future<bool>) optional param, here you can add yor own style dialog
    editorBackgroundColor: /// (Color) optional param, you can define your own background editor color
    galleryThumbnailQuality: /// (int = 200) optional param, you can set the gallery thumbnail quality (higher is better but reduce the performance)
);

Example

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
import 'package:vs_story_designer/vs_story_designer.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Story Designer Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Example(),
    );
  }
}

class Example extends StatefulWidget {
  const Example({Key? key}) : super(key: key);



  @override
  State<Example> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.black,
        resizeToAvoidBottomInset: false,
        body: Center(
          child: ElevatedButton(
            onPressed: (){
              Navigator.push(context, MaterialPageRoute(builder: (context) => VSStoryDesigner(
                centerText: "Start Your Design",
                // fontFamilyList: const [
                //   FontType.abrilFatface,
                //   FontType.alegreya,
                //   FontType.typewriter
                // ],
                onDone: (uri){
                  debugPrint(uri);
                  Share.shareFiles([uri]);
                },
              ))
              );
            },
            child: const Text('Open Story Designer'),
          ),
        )
    );
  }
}

ScreenShots

initial view

Custom image picker made with Photo_manager package

Gradient background taking image color pixel

Exit Dialog

Custom finger Drawing made with perfect_freehand package

Text Editor

All features together

Share to social networks made with share_plus package

Saved image

所属分类

依赖

依赖清单 12 项

源码仓库

使用此插件的项目

暂无相关数据。