fluvie 0.1.10
fluvie: ^0.1.10 copied to clipboard
Write a video like a Flutter screen: declarative widgets in, a real video file out. No timelines to scrub, no frame math.
Fluvie #
You write widgets. Fluvie turns them into a real video file. There is no timeline to scrub and no frame math: you describe what the video is, and Fluvie computes when everything happens.
You import the Fluvie barrel for Fluvie's surface, and Flutter widgets with
hide Animation so Fluvie's Animation wins:
import 'package:flutter/material.dart' hide Animation;
import 'package:fluvie/fluvie.dart';
Video helloVideo() => Video(
size: VideoSize.square,
poster: 1.seconds,
scenes: [
Scene(
duration: 4.seconds,
background: Background.gradient(const [Color(0xFF1A2980), Color(0xFF26D0CE)]),
children: [
const Text(
'Hello, Fluvie',
style: TextStyle(color: Colors.white, fontSize: 72, fontWeight: FontWeight.bold),
).animate([Animation.fadeIn(), Animation.pop()]),
],
),
],
);
This is lesson 01, verbatim. Render it to an MP4 with the
fluvie_cli headless renderer, or drive
RenderService yourself.
Why Fluvie #
- Declarative. Compose
Scenes and elements like any Flutter tree. - Cacheable. The frame cache keys on content, so caching, golden tests, and batch rendering all work.
- Complete. Text, images, video clips, charts, code and terminal scenes, diagrams, audio, captions, transitions, effects, templates, and multi-aspect export, all on one public API.
Author as data, or with AI #
A video can also be a JSON VideoSpec: save it, load it back, and render it. The
companion fluvie_ai package writes that
spec from a prompt with a language model, so you can generate a video from
natural language. The spec is plain data: save it, diff it, and re-render it.
See the
authoring guide.
Install #
dart pub add fluvie
Rendering needs FFmpeg on your PATH. See the installation guide.
Documentation #
Full guides, the reference, and twelve runnable lessons live at docs.fluvie.dev. Start with getting started, then the guides.
License #
MIT licensed. See the LICENSE file in this package.