story_maker 
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.
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
-
xImage Editing:- Image scaling and rotation
- Pinch-to-zoom and pan gestures
- Photo view with rotation support
-
xText Editing:- Adding text to images with customizable:
- Font family (with 50+ Google Fonts via
google_fontspackage) - Font size (adjustable slider from 14-74px)
- Text color (extensive color palette with 20+ default colors)
- Text background gradients (60+ gradient options)
- Font family (with 50+ Google Fonts via
- Real-time text preview
- Drag, rotate, and scale text items
- Multiple text items support
- Adding text to images with customizable:
-
xBackground Gradients:- 60+ pre-built gradient options
- Custom gradient support via
customGradientsparameter - Gradient selector with visual preview
-
xStickers Support:- Emoji stickers (50+ default emojis)
- Custom image/GIF stickers via
StickerItem.image() - Customizable sticker list via
customStickersparameter - Sticker selector with horizontal scrolling interface
- Drag, rotate, and scale sticker items
-
xColor 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
-
xTheme 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
- Complete UI theming system via
-
xCustomization Options:- Custom done button builder with theme, callback, and loading state access
- Customizable font lists via
customFontListparameter - Customizable text color lists via
customTextColorsparameter - Customizable gradient color lists via
customGradientsparameter - Customizable animation duration via
animationsDurationparameter
-
xUser 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
-
xDeveloper Experience:- Barrel files for organized imports
- Comprehensive documentation
- Type-safe APIs
- Backward compatible updates
Libraries
- components/components
- components/src/background_gradient_selector_widget
- components/src/font_family_select_widget
- components/src/overlay_item_widget
- components/src/remove_widget
- components/src/size_slider_widget
- components/src/sticker_selector_widget
- components/src/text_color_select_widget
- components/src/text_field_widget
- components/src/top_tools_widget
- constants/constants
- Barrel file for constants.
- constants/src/color_filters
- constants/src/font_colors
- constants/src/font_styles
- constants/src/gradients
- constants/src/item_type
- constants/src/stickers
- constants/src/ui_constants
- extensions/extensions
- Barrel file for extensions.
- extensions/src/context_extension
- models/models
- Barrel file for models.
- models/src/editable_items
- models/src/sticker_item
- story_maker
- A library for creating and editing stories.
- theme/src/story_maker_theme
- theme/src/story_maker_theme_provider
- theme/theme
- Barrel file for theme.
- utils/src/gradient_util
- utils/utils
- Barrel file for utilities.
