Comments (3)
Thank you very much :)
from advstory.
Hi JT, I created this package due to other's performance issues. This is a complete story view solution. But you can also control almost anything, including gestures. Try set the interceptor
to control navigation between stories or contents, or create a story view using AdvStory.player
to change the position, size, shape or anything else you want. You can also create your own contents for more customization, this package is really flexible.
- Use
interceptor
:
final _controller = AdvStoryController();
...
_controller.setInterceptor((event) {
if (event == StoryEvent.nextContent) {
// User tapped right %23 of screen, prevent content skip and print a log message instead for an example.
// Or skip to another story, another content etc.
return () => log(
'StoryEvent.nextContent blocked and printed this log instead.',
);
}
// Continue default flow for other events.
return null;
});
- Use
AdvStory.player
to create a specific size story view with rounded edges:
final _controller = AdvStoryPlayerController();
...
ClipRRect(
borderRadius: BorderRadius.circular(20),
child: SizedBox(
width: MediaQuery.of(context).size.width * .5,
height: MediaQuery.of(context).size.height * .5,
child: AdvStory.player(
storyCount: profilePics.length,
controller: _controller,
style: const AdvStoryStyle(
indicatorStyle: IndicatorStyle(
padding: EdgeInsets.all(8),
),
),
storyBuilder: (storyIndex) => Story(
contentCount: 3,
contentBuilder: (contentIndex) {
return SimpleCustomContent(
builder: (context) {
return Container(
color: Colors.blueAccent,
alignment: Alignment.center,
child: const Text('😎'),
);
},
);
},
),
),
),
),
- Also you can create your own tray view when
AdvStory.player
used:
final _controller = AdvStoryPlayerController();
...
StoryButtonThatOpensView(
onTap: () {
_controller.open(StoryPosition(2, 2));
}
),
StoryButtonThatClosesView(
onTap: () {
_controller.close();
}
),
from advstory.
Seems like I need to update docs for use-cases.
from advstory.
Related Issues (20)
- Update Example Stories & JSON HOT 4
- How to update story content dynamically HOT 5
- AdvStoryController throws exception when jumpTo called on trayTap event HOT 3
- [BUG] Content Skip HOT 1
- Help wanted HOT 3
- onSlideChanged & onStoryChanged Functions HOT 3
- how to scroll up and down as instagram reels or tiktok videos ? HOT 1
- Sync Tray with Stories HOT 4
- AdvStory with Provider HOT 3
- 2022-10-16 10:00:45.237726-0700 Runner[66039:3355191] [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Failed to load video: Cannot Open, null, null) HOT 1
- Change Background Color
- Bug in rtl app HOT 1
- Skip Viewed Content!
- Tweaking to behave a little more like an image gallery HOT 5
- safearea on Iphone 10++ HOT 3
- Stop Indicator When Story is Loading
- progress bar frozens while calling on api inside iconbuttom of footer
- WidgetStory AnimationController exception HOT 5
- Web / MacOS / Windows / Linux Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advstory.