Story Block (Flutter)
Integration
import 'package:fw_flutter_sdk/fw_flutter_sdk.dart';
import 'package:visibility_detector/visibility_detector.dart';
StoryBlockController? _storyBlockController;
/// discover
StoryBlock(
height: 400,
source: StoryBlockSource.discover,
)
/// channel
StoryBlock(
height: 400,
source: StoryBlockSource.channel,
channel: "your encoded channel id",
)
/// playlist
StoryBlock(
height: 400,
source: StoryBlockSource.playlist,
channel: "your encoded channel id",
playlist: "your encoded playlist id",
)
/// dynamic content
StoryBlock(
height: 400,
source: StoryBlockSource.dynamicContent,
dynamicContentParameters: const {
'<cohort key>': ['<cohort value1>', '<cohort value2>']
},
)
/// hashtag playlist
StoryBlock(
height: 400,
source: StoryBlockSource.hashtagPlaylist,
channel: "your encoded channel id",
hashtagFilterExpression: "<hashtag filter expression>",
)
/// sku
StoryBlock(
height: 400,
source: StoryBlockSource.sku,
channel: "your encoded channel id",
productIds: ["prodct_id_1", "prodct_id_2"],
)
/// single content
StoryBlock(
height: 400,
source: StoryBlockSource.singleContent,
contentId: "your encoded video or live stream id"
);Configure corner radius
Story block loading result callback
Empty callback
Play or pause story block programmatically
Open fullscreen story block programmatically (Android)
Enable PiP(Picture in Picture)
Set up the iOS project

Set enablePictureInPicture to true on Dart side
Keep alive when scrolling the widget out of the view box
Player configurations
Reference
Last updated
Was this helpful?