सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
एक फ्लटर पैकेज जो विकासकर्ताओं को अपने एप्लिकेशन में इंस्टाग्राम-शैली की कहानी इंटरफ़ेस बनाने की अनुमति देता है। यह स्वाइप करने योग्य कार्ड, टाइमर और इंटरैक्टिव तत्व जैसे कस्टमाइज़ेबल कहानी घटक प्रदान करता है, जो लोकप्रिय सोशल मीडिया कहानियों के दिखावट और अनुभव को नकल करता है। यह पैकेज Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्म का समर्थन करता है, जिससे यह क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए आदर्श है। सरल API के साथ, यह छवि और वीडियो प्लेबैक, प्रगति सूचकांक और उपयोगकर्ता अंतरक्रिया जैसी कहानी विशेषताओं को आसानी से एकीकृत करने की अनुमति देता है।
उपयोग
सोशल मीडिया ऐप्स
इंटरैक्टिव ट्यूटोरियल
उपयोगकर्ता ओनबोर्डिंग प्रवाह
सामग्री साझाकरण विशेषताएं
एंगेजमेंट-ड्रिवन यूआई
मुख्य विशेषताएँ
स्वाइप करने योग्य कहानी कार्ड
एम्बेडेड स्टोरी टाइमर
प्लेटफॉर्म के अनुकूल समर्थन
कस्टमाइज़ेबल यूआई कंपोनेंट्स
मीडिया प्लेबैक (छवि/वीडियो)
इंटरैक्टिव कहानी के तत्व
इनके लिए उपयुक्त
सोशल ऐप बनाने वाले डेवलपर्स
आकर्षक उपयोगकर्ता अनुभव बनाने वाली टीमें
समय-सीमित सामग्री प्रदर्शन की आवश्यकता वाले ऐप्स
बहु-प्लेटफॉर्म डिप्लॉयमेंट की आवश्यकता वाले प्रोजेक्ट
मूल जैसी कहानी इंटरफेस चाहने वाले डिज़ाइनर
विचार योग्य बातें
मीडिया संपत्ति के सावधानीपूर्वक निपटान की आवश्यकता होती है
ब्रांड सुसंगतता के लिए अतिरिक्त स्टाइलिंग की आवश्यकता हो सकती है
सीमित निर्मित विश्लेषण
बहुत लंबे कहानी के क्रम के लिए अनअनुकूलित
उन्नत विशेषताओं के लिए बाहरी निर्भरता पर निर्भर करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
This package allows you to create a storyboard like Instagram
For now it's just an early release with a lot of useful functionality missing
but it's already usable with some minor tweaks
Features
Present:
A list of story buttons that can be marked as "watched" automatically
3D page view list view in Instagram
Custom navigation
Default story scaffold
Missing yet:
Button preloaders that allow the stories to be requested from the backend before opening
Lazy loaders that preload visible the stories from the backend in the background
Getting started
The easiest way to get started is to use a built-in StoryListView to create story buttons
It accepts a list of StoryButtonData objects. These objects contain all the settings for each story including the list of pages, the timing for each page and many other settings. The pages can be completely custom, they're just widgets.
Usage
Here's the completely working example:
class_StoryExamplePageStateextendsState<StoryExamplePage> {
Widget_createDummyPage({
requiredString text,
requiredString imageName,
bool addBottomBar = true,
}) {
returnStoryPageScaffold(
bottomNavigationBar: addBottomBar
? SizedBox(
width: double.infinity,
height: kBottomNavigationBarHeight,
child: Padding(
padding: constEdgeInsets.symmetric(
vertical: 8.0,
horizontal: 20.0,
),
child: Row(
children: [
Expanded(
child: Container(
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
border: Border.all(
color: Colors.white,
width: 2.0,
),
borderRadius: BorderRadius.circular(
50.0,
),
),
),
),
constPadding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.send,
color: Colors.white,
),
),
],
),
),
)
: constSizedBox.shrink(),
body: Container(
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/$imageName.png',
),
fit: BoxFit.cover,
),
),
child: Padding(
padding: constEdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
text,
style: constTextStyle(
color: Colors.white,
fontSize: 30.0,
fontWeight: FontWeight.bold,
),
)
],
),
),
),
);
}
Widget_buildButtonText(String text) {
returnPadding(
padding: constEdgeInsets.all(5.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
text,
style: constTextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
],
),
);
}
BoxDecoration_buildButtonDecoration(
String imageName,
) {
returnBoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/$imageName.png',
),
fit: BoxFit.cover,
),
);
}
BoxDecoration_buildBorderDecoration(Color color) {
returnBoxDecoration(
borderRadius: constBorderRadius.all(
Radius.circular(15.0),
),
border: Border.fromBorderSide(
BorderSide(
color: color,
width: 1.5,
),
),
);
}
@overrideWidgetbuild(BuildContext context) {
returnScaffold(
appBar: AppBar(
elevation: 0.0,
title: constText('Story Example'),
),
body: Column(
children: [
StoryListView(
pageTransform: constStoryPage3DTransform(),
buttonDatas: [
StoryButtonData(
timelineBackgroundColor: Colors.red,
buttonDecoration: _buildButtonDecoration('car'),
child: _buildButtonText('Want a new car?'),
borderDecoration: _buildBorderDecoration(Colors.red),
storyPages: [
_createDummyPage(
text:
'Want to buy a new car? Get our loan for the rest of your life!',
imageName: 'car',
),
_createDummyPage(
text:
'Can\'t return the loan? Don\'t worry, we\'ll take your soul as a collateral ;-)',
imageName: 'car',
),
],
segmentDuration: constDuration(seconds: 3),
),
StoryButtonData(
timelineBackgroundColor: Colors.blue,
buttonDecoration: _buildButtonDecoration('travel_1'),
borderDecoration:
_buildBorderDecoration(constColor.fromARGB(255, 134, 119, 95)),
child: _buildButtonText('Travel whereever'),
storyPages: [
_createDummyPage(
text: 'Get a loan',
imageName: 'travel_1',
addBottomBar: false,
),
_createDummyPage(
text: 'Select a place where you want to go',
imageName: 'travel_2',
addBottomBar: false,
),
_createDummyPage(
text: 'Dream about the place and pay our interest',
imageName: 'travel_3',
addBottomBar: false,
),
],
segmentDuration: constDuration(seconds: 3),
),
StoryButtonData(
timelineBackgroundColor: Colors.orange,
borderDecoration: _buildBorderDecoration(Colors.orange),
buttonDecoration: _buildButtonDecoration('house'),
child: _buildButtonText('Buy a house anywhere'),
storyPages: [
_createDummyPage(
text: 'You cannot buy a house. Live with it',
imageName: 'house',
),
],
segmentDuration: constDuration(seconds: 5),
),
StoryButtonData(
timelineBackgroundColor: Colors.red,
buttonDecoration: _buildButtonDecoration('car'),
child: _buildButtonText('Want a new car?'),
borderDecoration: _buildBorderDecoration(Colors.red),
storyPages: [
_createDummyPage(
text:
'Want to buy a new car? Get our loan for the rest of your life!',
imageName: 'car',
),
_createDummyPage(
text:
'Can\'t return the loan? Don\'t worry, we\'ll take your soul as a collateral ;-)',
imageName: 'car',
),
],
segmentDuration: constDuration(seconds: 3),
),
StoryButtonData(
buttonDecoration: _buildButtonDecoration('travel_1'),
borderDecoration:
_buildBorderDecoration(constColor.fromARGB(255, 134, 119, 95)),
child: _buildButtonText('Travel whereever'),
storyPages: [
_createDummyPage(
text: 'Get a loan',
imageName: 'travel_1',
addBottomBar: false,
),
_createDummyPage(
text: 'Select a place where you want to go',
imageName: 'travel_2',
addBottomBar: false,
),
_createDummyPage(
text: 'Dream about the place and pay our interest',
imageName: 'travel_3',
addBottomBar: false,
),
],
segmentDuration: constDuration(seconds: 3),
),
StoryButtonData(
timelineBackgroundColor: Colors.orange,
borderDecoration: _buildBorderDecoration(Colors.orange),
buttonDecoration: _buildButtonDecoration('house'),
child: _buildButtonText('Buy a house anywhere'),
storyPages: [
_createDummyPage(
text: 'You cannot buy a house. Live with it',
imageName: 'house',
),
],
segmentDuration: constDuration(seconds: 5),
),
],
),
],
),
);
}
}
Additional information
The package is under lazy construction. It is required in some projects I'm working on but not so much yet so I'm not implementing new features very quickly
If you want to take part in the development, please feel free to make pull requests
but make sure your code corresponds to major Dart language guidelines