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

story_painter 封面
插件详情v0.0.4

story_painter

该包提供类似于 Instagram 故事编辑器的绘图体验。

近 30 天下载
40
喜欢数
26
Pub 分数
50

安装插件

flutter pub add story_painter

插件介绍

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

StoryPainter 是一个 Flutter 包,可让用户创建类似于 Instagram 故事编辑器的绘画体验。它提供了直观的工具,用于在画布上进行素描、上色和添加创意元素。该包设计简洁且性能出色,支持触摸输入、可自定义画笔和图层管理。非常适合需要表达性绘画功能的应用程序,例如社交媒体故事、数字艺术或笔记应用。该包可无缝集成到 Flutter 项目中,并由其发布者持续维护。

适合场景

  • 创建交互式故事板
  • 设计数字草图
  • 向图像添加注释
  • 构建创意内容工具
  • 启用用户生成的艺术作品

主要特点

  • 基于触摸的绘图界面
  • 可自定义的画笔设置
  • 图层支持绘图
  • 实时渲染
  • 与 Flutter 应用的简单集成

适合对象

  • 社交媒体应用开发者
  • 数字艺术家
  • 教育类应用开发者
  • 便签应用构建器
  • 创意工具设计师

使用建议

  • 有限的平台特定优化
  • 无内置导出功能
  • 需要手动处理状态持久化
  • 可能需要额外的样式以保持UI一致性
  • 依赖于 GitHub 仓库的外部维护

原始 README

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

story_painter

This package provides drawing experince like in story editor of Instagram.

story_painter is a modified version of the hand_signature.

Check out fast_color_picker from here.

Usage

Initialize the controller

StoryPainterControl painterControl = StoryPainterControl(
    type: PainterDrawType.shape,
    threshold: 3.0,
    smoothRatio: 0.65,
    velocityRange: 2.0,
    color: Colors.white,
    width: 8,
    onDrawStart: () {},
    onDrawEnd: () {},
);

Build StoryPainter with controller

StoryPainter(control: painterControl)

Change brush specs while drawing

painterControl.setColor(Colors.red);
painterControl.setWidth(24.0);

Export the image

ui.Image image = await painterControl.toImage(pixelRatio: 3.0);

Display or use the output

// Convert the data
ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png);
Uint8List pngBytes = byteData.buffer.asUint8List();

// Display with memory image
Image.memory(pngBytes)

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。