Skip to content
On this page

Story

A sequence of media stories with playback navigation.

Story in FluttyUIStory in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Story

const Story({
  super.key,
  required this.items,
  this.initialIndex = 0,
  this.name,
  this.subtitle,
  this.avatar,
  this.footer,
  this.muted = true,
  this.autoplay = true,
  this.borderRadius = 24,
  this.onChanged,
  this.onCompleted,
  this.onClose,
  this.onPrevious,
});
ParameterTypeRequiredDefault
keyKey?Nonull
itemsList<StoryItem>Yes—
initialIndexintNo0
nameString?Nonull
subtitleString?Nonull
avatarWidget?Nonull
footerWidget?Nonull
mutedboolNotrue
autoplayboolNotrue
borderRadiusdoubleNo24
onChangedValueChanged<int>?Nonull
onCompletedVoidCallback?Nonull
onCloseVoidCallback?Nonull
onPreviousVoidCallback?Nonull

Story.grouped

const Story.grouped({
  super.key,
  required List<StoryGroup> this.groups,
  this.initialGroupIndex = 0,
  this.initialIndex = 0,
  this.muted = true,
  this.autoplay = true,
  this.borderRadius = 24,
  this.onChanged,
  this.onGroupChanged,
  this.onCompleted,
  this.onClose,
});

Future<void> show

static Future<void> show({
  required BuildContext context,
  List<StoryItem>? items,
  List<StoryGroup>? groups,
  int initialGroupIndex = 0,
  ValueChanged<int>? onGroupChanged,
  BuildContext? originContext,
  double originRadius = 20,
  int initialIndex = 0,
  String? name,
  String? subtitle,
  Widget? avatar,
  Widget? footer,
  bool muted = true,
  ValueChanged<int>? onChanged,
  VoidCallback? onCompleted,
});

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/media/story/story.dart

This reference is generated from the Story declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI