New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple to: Adv/Infinite PageView #23
Comments
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
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;
});
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('😎'),
);
},
);
},
),
),
),
),
final _controller = AdvStoryPlayerController();
...
StoryButtonThatOpensView(
onTap: () {
_controller.open(StoryPosition(2, 2));
}
),
StoryButtonThatClosesView(
onTap: () {
_controller.close();
}
), |
Seems like I need to update docs for use-cases. |
Thank you very much :) |
Is your feature request related to a problem? Please describe.
Advstory is the best performing video playback package i've used. Preloading and caching second to none. Only issue is that you are kinda forced into the story format and into an opinionated way of navigating and gestures.
Describe the solution you'd like
A simple PageView solution that preloads & caches videos. Then the developers can do whatever they want from that point on. Video playback is a huge pain point in flutter and Advstory solves it but kinda forces you into a certain format.
Describe alternatives you've considered
Hacking advstory. Starting from the ground up.
Additional context
There's a huge community need and you would be a great help. Please check out this thread dedicated to it:
https://www.reddit.com/r/FlutterDev/comments/xpwtdr/coming_together_to_work_on_common_issues_every/
There's always a lot of questions on reddit about this...but no solid solution.
https://www.reddit.com/r/FlutterDev/comments/xou6uu/building_a_videodriven_social_app_with_flutter/
The text was updated successfully, but these errors were encountered: