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

story_maker 封面
插件详情v1.2.0

story_maker

一个用于创建类似 Instagram 故事的包,您可以使用此包编辑图片,并通过添加文字、贴纸和滤镜等内容使其适合故事使用。

AndroidiOSmacOSWindowsLinux
近 30 天下载
69
喜欢数
69
Pub 分数
140

安装插件

flutter pub add story_maker

插件介绍

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

Story_Maker 是一个 Flutter 包,旨在轻松创建类似 Instagram 的故事。它允许用户编辑图片,并通过添加文字、贴纸和滤镜来增强图片,使内容适合社交媒体分享。该包支持跨平台使用,兼容 Android、iOS、macOS、Windows 和 Linux,为不同设备提供无缝体验。该包提供了直观的工具,用于自定义故事视觉效果,非常适合需要动态、交互式故事创作功能的应用程序。

适合场景

  • 创建社交媒体故事
  • 向图像添加文本叠加
  • 应用滤镜和贴纸
  • 构建互动故事内容
  • 设计用户生成的故事模板

主要特点

  • 图像编辑功能
  • 文本添加工具
  • 贴纸集成
  • 过滤应用
  • 跨平台支持

适合对象

  • 社交媒体应用
  • 用户生成内容平台
  • 创意设计工具
  • 以移动设备为先的叙事应用
  • 交互式图像编辑器

使用建议

  • 需要图像资源管理
  • 有限的内置贴纸库
  • 需要自定义贴纸实现
  • 低端设备上的性能
  • 需要UI自定义以进行品牌化

原始 README

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

story_maker License: MIT

A package for creating instagram like story, you can use this package to edit images and make it story ready by adding other contents over it like text, stickers, gradients, and color filters.

GIF 1 GIF 2

Getting Started

Add this to your package's pubspec.yaml file:

dependencies:
  story_maker: ^1.2.0

Example

import 'package:story_maker/story_maker.dart';

class _MyAppState extends State<MyApp> {
  File? image;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Story Designer Example'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () async {
                await [
                  Permission.photos,
                  Permission.storage,
                ].request();
                final picker = ImagePicker();
                await picker
                    .pickImage(source: ImageSource.gallery)
                    .then((file) async {
                  final File editedFile = await Navigator.of(context).push(
                    MaterialPageRoute(
                      builder: (context) => StoryMaker(
                        filePath: file!.path,
                      ),
                    ),
                  );
                  setState(() {
                    image = editedFile;
                  });
                  print('editedFile: ${image!.path}');
                });
              },
              child: const Text('Pick Image'),
            ),
            if (image != null)
              Expanded(
                child: Image.file(image!),
              ),
          ],
        ),
      ),
    );
  }
}

Advanced Usage with Customization
import 'package:story_maker/story_maker.dart';

// Example with custom theme, stickers, and done button
StoryMaker(
  filePath: imagePath,
  theme: StoryMakerTheme.dark(), // or StoryMakerTheme.light()
  customStickers: [
    StickerItem.emoji('🎉'),
    StickerItem.emoji('🔥'),
    StickerItem.image('/path/to/sticker.png'),
  ],
  customFontList: ['Roboto', 'Open Sans', 'Lato'],
  customTextColors: [
    Colors.red,
    Colors.blue,
    Colors.green,
  ],
  customGradients: [
    [Colors.purple, Colors.pink],
    [Colors.blue, Colors.cyan],
  ],
  doneButtonBuilder: (theme, onDone, isLoading) {
    return ElevatedButton(
      onPressed: isLoading ? null : onDone,
      style: ButtonStyle(
        backgroundColor: WidgetStateProperty.all(theme.buttonColor),
      ),
      child: isLoading
          ? CircularProgressIndicator()
          : Text('Save Story', style: TextStyle(color: theme.buttonTextColor)),
    );
  },
)
Available Features
Core Features
  • [x] Image Editing:

    • Image scaling and rotation
    • Pinch-to-zoom and pan gestures
    • Photo view with rotation support
  • [x] Text Editing:

    • Adding text to images with customizable:
      • Font family (with 50+ Google Fonts via google_fonts package)
      • Font size (adjustable slider from 14-74px)
      • Text color (extensive color palette with 20+ default colors)
      • Text background gradients (60+ gradient options)
    • Real-time text preview
    • Drag, rotate, and scale text items
    • Multiple text items support
  • [x] Background Gradients:

    • 60+ pre-built gradient options
    • Custom gradient support via customGradients parameter
    • Gradient selector with visual preview
  • [x] Stickers Support:

    • Emoji stickers (50+ default emojis)
    • Custom image/GIF stickers via StickerItem.image()
    • Customizable sticker list via customStickers parameter
    • Sticker selector with horizontal scrolling interface
    • Drag, rotate, and scale sticker items
  • [x] Color Filters:

    • 8 color filter options: None, Sepia, Grayscale, Vintage, Cool, Warm, Bright, Dark
    • Swipe left/right gestures for quick filter navigation
    • Filter name overlay display when selecting filters
    • Color filter picker with visual preview
    • Real-time filter application
  • [x] Theme Customization:

    • Complete UI theming system via StoryMakerTheme
    • Pre-built dark and light theme variants
    • Customizable colors (background, buttons, icons, text, borders)
    • Customizable border radius and shadows
    • Theme provider system for easy access throughout widget tree
    • Support for custom button styles and decorations
  • [x] Customization Options:

    • Custom done button builder with theme, callback, and loading state access
    • Customizable font lists via customFontList parameter
    • Customizable text color lists via customTextColors parameter
    • Customizable gradient color lists via customGradients parameter
    • Customizable animation duration via animationsDuration parameter
  • [x] User Experience:

    • Haptic feedback on interactions
    • Style name overlay when changing font families
    • Filter name overlay when changing color filters
    • Delete item by dragging to bottom area
    • Smooth animations and transitions
    • Loading state during image export
  • [x] Developer Experience:

    • Barrel files for organized imports
    • Comprehensive documentation
    • Type-safe APIs
    • Backward compatible updates

"Buy Me A Coffee"

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。